clayjohn
1b2cd9f251
Addition of FogVolumes, FogShaders, FogMaterial, and overhaul of VolumetricFog
...
Co-authored-by: Brian Semrau <brian.semrau@gmail.com>
2021-10-28 22:02:23 -07:00
Rémi Verschelde
3b11e33a09
clang-format: Disable alignment of operands, too unreliable
...
Sets `AlignOperands` to `DontAlign`.
`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Yuri Roubinsky
57fd362fe1
Prevent shader crash when passing constant expression to textureGather
2021-10-21 19:46:05 +03:00
Yuri Roubinsky
e9b7ffd1fa
Added few more built-ins to shader language
2021-10-13 20:27:36 +03:00
Rémi Verschelde
09b0293fad
Merge pull request #53066 from Chaosus/shader_funcs
2021-10-10 21:37:07 +02:00
Yuri Roubinsky
b1ac3e256f
Allow declare the shader arrays with a size defined before identifier
2021-10-08 10:28:31 +03:00
Yuri Roubinsky
e707391fb8
Fix shader crash when passing array to index expression
2021-10-07 10:48:32 +03:00
Yuri Roubinsky
be6f36a66d
Add missing shader built-ins
2021-10-05 20:50:26 +03:00
Yuri Roubinsky
7c07ae4c50
Fix shader crash when passing array.length to functions
...
and similar cases
2021-10-05 12:49:59 +03:00
Yuri Roubinsky
69ece73653
Fix syntax parsing error of uniform arrays declaration in shader
2021-10-04 23:19:43 +03:00
Yuri Roubinsky
6873ecaaf9
Added support for uniform arrays in shaders
2021-10-04 13:57:44 +03:00
Lightning_A
c63b18507d
Use range iterators for Map
2021-09-30 15:09:12 -06:00
Yuri Roubinsky
e9e21a592e
Prevents editor crash when compare with negative float in shader
2021-09-22 13:26:40 +03:00
Yuri Roubinsky
f68d3f67b5
Fix shader crash when passing array to built-in function without index
2021-09-18 14:05:14 +03:00
reduz
700f9d916d
More fixes to mobile renderer
...
* Specify all precision qualifiers
* Makes renderer work on Adreno Vulkan
2021-08-18 12:20:19 -03:00
Yuri Roubinsky
fa96c98bdf
Fix shader crash when using local var with the same name as varying
2021-08-13 09:20:16 +03:00
Rémi Verschelde
b63af73435
Merge pull request #51391 from Chaosus/shader_param_names
...
Added parameter names to shader built-in function autocompletion
2021-08-12 14:58:11 +02:00
Yuri Roubinsky
fb37846b00
Added parameter names to shader built-in function autocompletion
2021-08-12 11:19:53 +03:00
Yuri Roubinsky
efc6b29601
Merge pull request #51505 from Chaosus/shader_fix_shadetype-errorline
2021-08-11 14:46:04 +03:00
Yuri Roubinsky
2fb5231bbc
Break futher shader compilation after missing ;
aftershader_type
2021-08-11 12:37:59 +03:00
Yuri Roubinsky
0f42a29864
Allow using more assignment operators on matrixes in shaders
2021-08-11 11:51:39 +03:00
Yuri Roubinsky
fead1595f9
Fix shader crash when using varying array in fragment->light context
2021-08-11 09:44:00 +03:00
Yuri Roubinsky
c082982a47
Fix editor crash if passing index as variable to function parameter
2021-07-26 17:42:52 +03:00
Yuri Roubinsky
b47b3a9957
Prevents shader crashing if varying assigned incorrectly
2021-07-26 14:47:14 +03:00
Yuri Roubinsky
3013324a4e
Fix compilation of shader_language.cpp
2021-07-26 13:44:21 +03:00
Rémi Verschelde
a8fcfbf029
Merge pull request #50729 from Chaosus/shader_varying_enchancements2
...
Allow using vertex-stage varying in both `fragment` and `light` functions
2021-07-26 12:17:49 +02:00
Rémi Verschelde
9b9e09f675
Merge pull request #50728 from Chaosus/shader_varying_enchancements
...
Allow using vertex varying in custom functions under any circumstances
2021-07-26 12:17:40 +02:00
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators
2021-07-25 12:22:25 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations
2021-07-23 17:38:28 -04:00
Yuri Roubinsky
17b462cc5f
Allow using vertex-stage varying in both fragment
and light
2021-07-22 11:55:14 +03:00
Yuri Roubinsky
94a7b04a01
Allow using vertex varying in custom functions under any circumstances
2021-07-22 11:27:13 +03:00
Yuri Roubinsky
39c06604cd
Forbid varyings from assigning in custom functions to prevent crashes
2021-07-21 14:12:54 +03:00
Yuri Roubinsky
14d5b47a27
Prevent error if varying assigned but not used (push warning instead)
2021-07-15 18:07:19 +03:00
Yuri Roubinsky
5100eed012
Added a shader warning about unused local variable
2021-06-29 15:39:37 +03:00
Lightning_A
b6af2a29eb
Rename is_valid_integer()
to is_valid_int()
...
Method from `String`
2021-06-16 10:32:22 -06:00
Yuri Roubinsky
eec82d9f75
Prevent shader crash when returning array when return type is scalar
2021-06-06 14:59:52 +03:00
Aaron Franke
08a85352fb
Rename Variant TRANSFORM to TRANSFORM3D
...
Also _transform to _transform3d
2021-06-03 07:30:01 -04:00
Aaron Franke
de3f6699a5
Rename Transform to Transform3D in core
2021-06-03 07:30:01 -04:00
Yuri Roubinsky
5874b7a29c
Allow shader arrays to be passed as parameters and return value
2021-05-22 20:15:03 +03:00
Yuri Roubinsky
084648bd18
Basic warning support implementation for the Godot Shading Language.
2021-05-22 19:24:31 +03:00
Yuri Roubinsky
6135744786
Implements length() shader function for arrays in structs
2021-05-19 21:50:11 +03:00
Yuri Roubinsky
96b2e54c70
Fix typo in shader_language.cpp
2021-05-18 19:01:02 +03:00
Hugo Locurcio
e905e8f145
Highlight control flow keywords with a different color
...
This makes them easier to distinguish from other keywords.
2021-05-05 22:38:12 +02:00
Yuri Roubinsky
3c82f01134
Fix shader handle constant expressions in function call
2021-04-27 15:23:01 +03:00
Dennis Brakhane
31d41d83c3
Remove duplicate comments
...
A few single line comments were duplicated, probably due to bad merges.
This commit removes the obviously duplicate ones.
2021-04-25 20:03:52 +02:00
reduz
d3b49c416a
Refactor GLSL shader compilation
...
-Used a more consistent set of keywords for the shader
-Remove all harcoded entry points
-Re-wrote the GLSL shader parser, new system is more flexible. Allows any entry point organization.
-Entry point for sky shaders is now sky().
-Entry point for particle shaders is now process().
2021-04-14 11:37:52 -03:00
Rémi Verschelde
d83761ba80
Style: Apply clang-tidy's readability-braces-around-statements
2021-04-05 14:09:59 +02:00
Rémi Verschelde
9bbe51dc27
Style: Apply clang-tidy's modernize-use-nullptr
2021-04-05 14:05:07 +02:00
Rémi Verschelde
e9cb64a8b5
Merge pull request #46522 from Ev1lbl0w/bugfix-shader_noret
...
Added missing returns on error scenarios
2021-03-01 09:36:15 +01:00
Yuri Roubinsky
19e0a1ec9d
Fix parsing hexadecimal (lowercase e
,f
) in shaders
2021-03-01 09:08:44 +03:00