Commit Graph

155 Commits

Author SHA1 Message Date
Yuri Rubinsky 7c9afbc139 Fix warning printing for `VisualShaderNodeTextureParameter` 2024-07-22 11:22:27 +03:00
Yuri Rubinsky cf70cb57ee Few fixes for `VisualShaderNodeRotationByAxis` 2024-07-18 11:10:36 +03:00
Rémi Verschelde f1ac3e26cc
Merge pull request #83729 from Chaosus/vs_fix_texture_param
Add extra warning messages to `VisualShaderNodeTextureParameter`
2024-06-12 10:00:23 +02:00
jsjtxietian 8d888807f7 Sync visual shader's distance fade using circular fade 2024-06-07 11:32:27 +08:00
Hendrik Brucker 62776842df [VisualShader] Add reroute node and improve port drawing 2024-05-13 03:26:01 +02:00
biswas08433 92fe4bb693 Fixes Texture2dParameter node filter option
This bug was appending 2 colons in the generated code.  Fixed it.
2023-11-12 01:59:53 +05:30
Yuri Rubinsky 3b353075dc Add extra warning messages to `VisualShaderNodeTextureParameter` 2023-10-21 16:48:38 +03:00
DennisManaa f248420a2b made visual shader ports expandable by default if there is only one output port and it's of any vector type
Co-authored-by: QbieShay <cislaghi.ilaria@gmail.com>
2023-09-22 15:28:59 +02:00
Patrick 65b0989f68 Additional Visual Shader Nodes
* RotationByAxis Visual Shader Node added
* WorldPositionFromDepth Visual Shader Node added
* ScreenNormalWorldSpace Visual Shader Node added
2023-07-26 00:39:12 +02:00
Yuri Roubinski 01101134f4 Make the dragging connections more user-friendly in visual shaders 2023-07-20 15:00:19 +03:00
Hendrik Brucker 7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Patrick e3802d5b6f Fix ndc calculation for LinearSceneDepth VS node in GLES3 2023-03-14 15:05:01 +01:00
QbieShay 7881422901 make particle billboard take into account non-uniform scale 2023-02-13 21:18:55 +01:00
clayjohn 04a9933f2e Mark fma function as high end so it isn't used with the gl_compatibility renderer 2023-02-08 12:56:15 -08:00
Yuri Rubinsky bcecb4fe37 Use mix for vector types in switch node in the visual shader 2023-01-31 09:45:27 +03:00
Yuri Rubinsky 8c8c333bf2 Add derivative functions with precision to shaders 2023-01-26 20:53:46 +03:00
Yuri Rubinsky f9b5e9da37 Fix code generation for ProximityRange node in visual shader 2023-01-20 22:31:37 +03:00
Yuri Rubinsky 7cbe2b939e Some refactoring for visual shader texture functions 2023-01-20 12:54:20 +03:00
clayjohn faea9f5c10 Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTURE
in favour of texture hints
2023-01-18 19:52:47 -08:00
Nong Van Tinh d6b923ae05 Fixes incorrect caption for TextureParameterTriplanar 2023-01-17 12:10:01 +07:00
Yuri Rubinsky f101add78b Add `uint` type support to visual shaders 2023-01-06 10:35:25 +03:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
dzil123 445062e43b Visual Shader UVFunc keep existing input value on function change 2022-11-10 04:31:05 -08:00
Yuri Rubinsky 19126d22a4 Fix code generation for some visual shader nodes 2022-10-19 09:09:56 +03:00
Patrick 91a9e7af3f Fix typo in VisualShader DistanceFade node 2022-10-18 18:20:31 +02:00
Yuri Rubinsky 3401228fbd Fix code generation for `VisualShaderNodeTextureParameterTriplanar` 2022-09-07 07:02:07 +03:00
Patrick e3ee2a0a6e Disable Output port preview of Linear Depth Visual Shader node
This disables the output port preview of the node because it's enabled preview caused a shader compilation error
2022-09-03 22:36:37 +02:00
Yuri Rubinsky 8191b3c110 Rename `uniform` to `parameter` across the engine 2022-09-01 11:42:57 +03:00
Patrick 323ff657c0 Fix LinearDepth calculation for GLES3
This change will calculate the depth ndc differently for GLES3 and Vulkan as described in here:
stable:
https://docs.godotengine.org/en/stable/tutorials/shaders/advanced_postprocessing.html
godot 4 with vulkan:
https://docs.godotengine.org/en/latest/tutorials/shaders/advanced_postprocessing.html
2022-08-31 21:00:13 +02:00
Patrick Exner 55bbcc54e7 Implement custom non-trivial shader functions 2022-08-27 22:59:12 +02:00
Clay John 547e64d226
Merge pull request #63999 from QbieShay/qbie/vs-qol
Quality of life visual shaders updates
2022-08-18 14:47:23 -06:00
QbieShay ecbeb8de1b Improve visual shader defaults for quality of life
- multiply part of addmultiply defaults to 1
- curvetexture's repeat is turned off
- vectors into float takes first component instead of average
2022-08-12 19:39:56 +02:00
Rémi Verschelde f754dd20be
Merge pull request #62454 from Geometror/reflect-refract-vec2-vec4
Allow for vec2/vec4 to be used in reflect and refract
2022-08-07 19:16:05 +02:00
Hendrik Brucker b8d5f4bdd5 Allow vec2 and vec4 for reflect and refract 2022-08-07 18:03:16 +02:00
Hugo Locurcio 813f6a5d57
Add `hint_transparent` to use a transparent black placeholder texture
This can be used in shaders to avoid the need to supply a transparent
placeholder texture manually.
2022-08-01 23:38:06 +02:00
Aaron Record 14df02b21f Fix typo "Frac" instead of "Fract" 2022-06-05 19:20:32 -06:00
Rémi Verschelde 1314e6cbcc
Merge pull request #60803 from Chaosus/shader_hint_rename
Rename `hint_albedo`, `hint_white/black` in shaders
2022-05-24 08:15:33 +02:00
reduz 746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Yuri Roubinsky a8bbe570ca Rename `hint_albedo`, `hint_white/black` in shaders 2022-05-09 22:50:18 +03:00
Yuri Rubinsky 033e211724
Merge pull request #60845 from Chaosus/vs_color_func 2022-05-09 21:34:34 +03:00
Yuri Roubinsky ee1b7a033d Push `HSV2RGB/RGB2HSV` to `ColorFunc` (from `VecFunc`) in visual shaders 2022-05-07 09:49:12 +03:00
Yuri Roubinsky edd3b1274e Change output port of `VisualShaderNodeColorUniform` to vec4 2022-05-07 08:40:19 +03:00
Aaron Franke fa7a7795f0
Rename Basis get_axis to get_column, remove redundant methods 2022-05-03 09:37:47 -05:00
Yuri Roubinsky 8bf632240d Continue to improve vector4 type in visual shaders 2022-04-22 22:29:26 +03:00
Hendrik Brucker cf58d23a72 Add Vector4 to VisualShader 2022-04-12 19:09:29 +02:00
Rémi Verschelde 7119d355eb String: Remove TTR and DTR defines in non-tools build
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00
Yuri Roubinsky 0d9aecd967 Rename several transform built-ins in shaders 2022-03-18 12:10:55 +03:00
Yuri Roubinsky 4d6790e9df Add `_get_func_code/_is_available` virtual functions to custom nodes 2022-03-08 16:23:44 +03:00
Markus Sauermann 79a75cd683 simplify calculation of max in grayscale 2022-02-20 18:36:46 +01:00
Yuri Roubinsky a6e280c5de Add some more fixes to visual shader 2022-02-07 11:28:42 +03:00