Commit graph

60 commits

Author SHA1 Message Date
Yuri Roubinsky
58696fd774 Allow multiple declarations in for loop in a shader 2022-02-03 11:35:38 +03:00
Yuri Roubinsky
e0304f83e7 Add translation links to shader errors 2022-01-19 15:16:32 +03:00
Yuri Roubinsky
36a82c8c69 Unify variable and array declarations in shaders 2022-01-18 12:42:39 +03:00
Yuri Roubinsky
08208406ca Refactor size expression parsing for arrays in the shaders 2022-01-15 15:47:39 +03:00
Yuri Roubinsky
c377891145 Add completion for shader_type 2022-01-13 18:37:13 +03:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Yuri Roubinsky
fd9c92d4ab Add a shader warning when the uniform buffer limit is exceeded 2022-01-03 16:24:56 +03:00
Yuri Roubinsky
108b6a2000 Allow pass varyings as out param to the function, when it's possible 2021-12-23 18:03:19 +03:00
Yuri Roubinsky
e8a457ba89 Refactor render_mode in shaders, forbid declaring duplicates 2021-12-21 22:20:09 +03:00
Yuri Roubinsky
f0a58af12f Rename shader hint filter_anisotropy to filter_anisotropic 2021-12-15 22:12:38 +03:00
Yuri Roubinsky
25a2241e7d Fix shader array parsing in variable declaration 2021-12-15 17:54:15 +03:00
Rémi Verschelde
864ccb5776
Merge pull request #55913 from Chaosus/fix_shader_crash 2021-12-15 13:07:34 +01:00
Yuri Roubinsky
09185d76ac Rename shader hint filter_aniso to filter_anisotropy 2021-12-15 13:18:32 +03:00
Yuri Roubinsky
3cbd8ef098 Fix shader crash when assigned array from struct to a variable by index 2021-12-13 21:19:13 +03:00
Hugo Locurcio
92e9cca5be
Rename hint_aniso to hint_anisotropy in the shader language
The word "anisotropy" is used in full form in BaseMaterial3D's
anisotropy-related properties.
2021-12-10 17:41:17 +01:00
Yuri Roubinsky
bcbcf14469 Refactor constant suffix parsing in a shader 2021-12-10 15:38:27 +03:00
Yuri Roubinsky
b66510d509 Added completion for uniform hints in a shader 2021-12-10 10:12:25 +03:00
Yuri Roubinsky
76f6c0849c Make compile shader function to use struct instead long parameter list 2021-12-08 11:34:40 +03:00
Yuri Roubinsky
5ba93619fa Allow using empty statements in the shader, added formatting warning 2021-12-01 11:52:25 +03:00
Yuri Roubinsky
6e80e97b0f Fix built-in(PI, TAU, E) assignment to a global constant in a shader 2021-11-29 10:32:36 +03:00
Yuri Roubinsky
e9b7ffd1fa Added few more built-ins to shader language 2021-10-13 20:27:36 +03: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
7c07ae4c50 Fix shader crash when passing array.length to functions
and similar cases
2021-10-05 12:49:59 +03:00
Yuri Roubinsky
6873ecaaf9 Added support for uniform arrays in shaders 2021-10-04 13:57:44 +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
Yuri Roubinsky
fb37846b00 Added parameter names to shader built-in function autocompletion 2021-08-12 11:19:53 +03:00
Yuri Roubinsky
b47b3a9957 Prevents shader crashing if varying assigned incorrectly 2021-07-26 14:47:14 +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
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
5100eed012 Added a shader warning about unused local variable 2021-06-29 15:39:37 +03:00
Yuri Roubinsky
7dd65a066e Fix length() array function usage in shader 2021-06-10 10:04:28 +03: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
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
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
Yuri Roubinsky
dd0874e717 Allow passing varying from fragment to light shader function 2021-02-11 15:59:21 +03:00
Rémi Verschelde
b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Yuri Roubinsky
bc0e8e7a21 Fix using post-init shader array constructors 2020-12-27 01:07:24 +03:00
Yuri Roubinsky
fe4c8e387b Added support for constants in shader case and array size declaration 2020-12-17 11:51:18 +03:00
bruvzg
644f739660
Static analyzer fixes:
Removes unused code in OS.
Fixes return types.
Fixes few typos.
2020-12-09 10:17:53 +02:00
George Marques
02f60812ed
Rename TYPE_REAL to TYPE_FLOAT
To be consistent with the naming everywhere else.
2020-12-04 09:47:26 -03:00
reduz
127458ed17 Reorganized core/ directory, it was too fatty already
-Removed FuncRef, since Callable makes it obsolete
-Removed int_types.h as its obsolete in c++11+
-Changed color names code
2020-11-07 20:17:12 -03:00
Yuri Roubinsky
6914597026 FIx autocompletion for emit_particle in shader editor 2020-10-13 14:12:51 +03:00
reduz
d0bddf53c5 Implement manual particle emission and particle sub emitters. 2020-09-06 10:29:27 -03:00
Yuri Roubinsky
c554d9e556 Added const qualifier support for function arguments in shaders 2020-07-01 12:55:00 +03:00
Yuri Roubinsky
636a9d9f50 Implemented global const array to shaders 2020-06-19 16:04:54 +03:00