d1083c9722
Improve error messages for method calls expecting only 1 argument
2025-06-12 17:02:59 +02:00
d674c9e289
Add stencil support for spatial materials
2025-06-11 09:59:10 -05:00
de37627404
Merge pull request #102552 from DarioSamo/shader-baker
...
Add shader baker to project exporter.
2025-05-28 17:09:38 -05:00
8c6a88cda6
Merge pull request #106781 from max99x/fix-shader-crash
...
Fix shader compiler crash when parsing case labels with non-existent vars.
2025-05-28 09:47:36 -05:00
5a30a7e7cd
Add shader baker to project exporter.
...
Metal Support contributed by Migeran (https://migeran.com ) and Stuart Carnie.
Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com >
Co-authored-by: Gergely Kis <gergely.kis@migeran.com >
2025-05-27 12:45:27 -03:00
4cb8a0c77e
Add resize_initialized and resize_uninitialized to Vector. These functions serve as replacements for resize, to make sure the caller understands whether elements need to be initialized 'by hand' after the call.
2025-05-26 18:35:41 +02:00
d042763750
Fix shader compiler crash when parsing case labels with non-existent vars.
2025-05-24 13:19:35 -07:00
16f51d4671
Remove duplicated entries from shader built-ins
2025-05-10 19:24:20 +03:00
5a14ab7c39
[Shaders] Allow constants and expressions in hint_range
2025-04-17 17:43:01 +03:00
a6979ef664
Merge pull request #97801 from basicer/srgb-color-hint
...
Add `color_conversion_disabled` shader hint.
2025-04-14 19:39:42 -05:00
8c54290b4a
Add color_conversion_disabled shader hint.
...
Sometimes shaders want to accept a color as input that is always
in the srgb color space. This adds a hint to vec3/vec4 to enable
the color picker popup for those vectors but disable color space
conversion.
2025-04-10 21:31:15 -07:00
9e0798ed36
Shader: Fix bvec to variant conversion
2025-04-01 19:03:15 +08:00
a03ec29ac5
Merge pull request #103434 from Chaosus/shader_fix_unused_varying_warning
...
Fix "unused varying" incorrect warning in shaders
2025-03-12 10:31:42 -05:00
7459a0361d
Merge pull request #103177 from Murrent/shader_default_at_top
...
Allow `default` case at the top of a switch scope in shaders
2025-03-07 15:12:55 -06:00
c937b6d180
Merge pull request #102419 from Ivorforce/std-size
...
Use `std::size` instead of `sizeof(a) / sizeof(a[0])` pattern throughout the codebase.
2025-03-07 15:12:25 -06:00
2824978178
Fix "unused varying" incorrect warning in shaders
2025-03-01 18:21:10 +03:00
4f46ecc479
Allow default case at the top of a switch scope in shaders
...
Revert "Removed translations of unused error message"
This reverts commit 6dbc75e000375196eb0176e65eb41935f71fc4fe.
Variable name change
Detecting multiple default cases in shaders
Removed translations of unused error message
Allowing default case at top of scope in switch statement in shaders
2025-02-25 20:59:36 +01:00
946c254cec
Fix crash at using increment op for varying in light shader function
2025-02-15 17:37:18 +03:00
35100396e4
Validate varying count when compiling shaders
...
This avoids crashing on devices when a number of varyings greater than the device limit is used.
For now this accurately prints an error when compiling the shader, but the error text only pops up in the editor if the number of user varyings is above the limit.
2025-02-13 15:07:15 -08:00
e34f1f504c
Use std::size instead of sizeof(a) / sizeof(a[0]) pattern throughout the codebase.
2025-02-07 14:57:48 +01:00
570e59df3d
Fix shader uniforms has null as default value
2025-01-31 07:35:51 +03:00
e88e30c273
Remove unused headers in servers.
...
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com >
2024-12-20 18:51:01 +08:00
ceefc0d38a
Implement 2D instance shader parameters
...
Co-authored-by: kobewi <kobewi4e@gmail.com >
Co-authored-by: yesfish <huwpascoe@users.noreply.github.com >
Co-authored-by: Álex Román Núñez <eirexe123@gmail.com >
2024-12-17 23:59:16 +01:00
9ecdeb3723
Merge pull request #98747 from tetrapod00/standardize-renderer-strings
...
Standardize terms for renderers in error strings
2024-12-13 16:19:37 -06:00
3dacc5fb7f
Merge pull request #95737 from Chaosus/shader_fix_varyings
...
Fix shader crash when using varyings with non-`flat` integer type
2024-12-11 17:36:06 -06:00
133471afb0
[Shader Language] Add missing token name.
2024-12-11 21:05:14 +02:00
a7bb85d2b7
Fix shader crash when using varyings with non-flat integer type
2024-12-09 12:52:01 +03:00
5a48e527b2
Fix orphan strings in shader preprocessor
2024-11-28 11:22:17 +03:00
899f5151c3
Standardize terms for renderers in error strings
...
Use "Forward+", "Mobile", "Compatibility", and "renderer" or "rendering method".
2024-11-10 13:30:44 -08:00
ff9fb0abea
Merge pull request #93590 from Chaosus/shader_custom_func_discard
...
Allow usage of `discard` inside custom shader functions
2024-10-24 09:38:10 +03:00
ad7e7a51b2
Allow usage of discard inside custom shader functions
2024-10-17 16:06:33 +03:00
74c000db17
Allow using stage functions inside custom shader functions
2024-10-17 15:47:01 +03:00
af77100e39
Merge pull request #92441 from Chaosus/shader_custom_func_overloads
...
Implement custom function overloading in shading language
2024-10-14 14:09:59 -05:00
1c86feee0a
Implement custom function overloading in shading language
2024-10-08 15:54:00 +03:00
842f982397
Merge pull request #96819 from clayjohn/GLES3-instance-uniforms
...
Implement instance uniforms in Compatibility renderer
2024-10-07 13:41:47 -06:00
3828d45e31
Fix shader crash when return a void function call
2024-09-26 11:20:39 +03:00
1a6f8512bc
Add external texture support (GLES3)
...
Co-authored-by: Fredia Huya-Kouadio <fhuyakou@gmail.com >
Co-authored-by: Mauricio Narvaez <nvz@meta.com >
2024-09-20 10:48:32 -05:00
b2611c198e
Fix shader incorrectly expects int on uint and vice-versa in cases
2024-09-11 09:22:27 +03:00
29df589632
Implement instance uniforms in Compatibility renderer
2024-09-10 12:20:47 -07:00
af92fdb0ac
Add basic support to evaluate operator value in shader language
2024-09-09 15:12:11 +03:00
10a92287c6
Merge pull request #94352 from Chaosus/shader_ternary_fix
...
Fix multiple ternary expressions to be used without parenthesis
2024-08-28 00:12:07 +02:00
cbe1d6f7af
Merge pull request #95274 from Chaosus/shader_forbind_const_func_decl
...
Forbid function declaration with a const qualifier in shaders
2024-08-25 20:18:10 +02:00
7999b4bb8a
Merge pull request #94324 from SomeRanDev/shader_hint_enum
...
GDShader: Add `hint_enum` for `uniform int`
2024-08-20 10:01:57 +02:00
6bf64027b7
Merge pull request #94785 from Chaosus/shader_fix_samplers_order
...
Fix texture samplers to not being last in the property list
2024-08-19 16:05:21 +02:00
664ff6f7c4
Merge pull request #95547 from Chaosus/shader_fix_for_middle_expression
...
Fix middle expression of `for` loop to accept not only operators
2024-08-16 14:36:10 +02:00
9c77f57a1d
Merge pull request #95350 from Chaosus/shader_fix_for_loop_comma_crash
...
Fix shader crash when the comma used in `for` loop as a trailing
2024-08-16 14:33:42 +02:00
5098ac587e
Merge pull request #94896 from jsjtxietian/carry-subgroup
...
Fix uniform subgroup in shader will carry out to next group
2024-08-16 10:35:00 +02:00
3272f00525
Fix middle expression of for loop to accept not only operators
2024-08-15 10:29:19 +03:00
d74749fd60
Fix shader crash when the comma used in for loop as a trailing
2024-08-10 11:23:11 +03:00
dc6f90acd8
Forbid function declaration with a const qualifier in shaders
2024-08-08 11:23:27 +03:00