Rémi Verschelde
e3b60a1530
Move RenderingMethod::RenderInfo to RenderingServerTypes
...
Also move RS::scaling_3d_mode_type to RenderingServerEnums.
2026-02-25 20:17:28 +01:00
Rémi Verschelde
f5a290ac46
Move RenderingServer enums to a dedicated RenderingServerEnums (RSE) namespace
...
A number of headers in the codebase included `rendering_server.h` just for
some enum definitions. This means that any change to `rendering_server.h` or
one of its dependencies would trigger a massive incremental rebuild.
With this change, we decouple a number of classes from `rendering_server.h`,
greatly speeding up incremental rebuilds for that area.
On my machine, this reduces incremental compilation time after an edit of
`rendering_server.h` by 60s (from 2m57s).
2026-02-25 19:43:03 +01:00
Clay John
69a923e340
Add compatibility fallback to textureLod when reading from RADIANCE
...
This is needed due to the discontinuity in the seam of the octahedral coordinates
2026-02-10 16:00:30 -08:00
Colin O'Rourke
63f6e3691c
DrawableTextures
...
Implementing DrawableTextures based on: https://github.com/godotengine/godot-proposals/issues/7379
2026-01-29 01:16:06 -08:00
clayjohn
6b4e26c479
Add compatibility handler to RADIANCE in sky shaders since the type was changed.
...
It was a textureCube, but now it is a texture2D. For compatibility purposes we need to continue exposing a cube texture. So we need to add this scaffolding to properly sample from it.
2026-01-08 16:19:38 -08:00
Kaleb Reid
8ad335eae0
Divide screen texture by luminance multiplier in compatibility
2025-10-04 00:19:42 -07:00
Luo Zhihao
5f737952fd
ShaderCompiler: Optimize compilation error printing
2025-09-04 16:51:17 +08:00
Apples
d674c9e289
Add stencil support for spatial materials
2025-06-11 09:59:10 -05:00
Thaddeus Crews
579feb387c
Core: Add [[nodiscard]] to string-like classes
2025-05-06 12:23:41 -05:00
A Thousand Ships
5113022dfe
Clean up some uses of String::substr
...
Cases where the end position is either equvalent to the default or past
the end of the string.
2025-03-07 14:50:38 +01:00
clayjohn
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
Yufeng Ying
e88e30c273
Remove unused headers in servers.
...
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2024-12-20 18:51:01 +08:00
Thaddeus Crews
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
Chaosus
a7bb85d2b7
Fix shader crash when using varyings with non-flat integer type
2024-12-09 12:52:01 +03:00
Lukas Tenbrink
b5c31ebb41
Add contains_char() for single-character 'contains' calls.
2024-12-06 20:23:35 +01:00
Chaosus
5efe8ccdea
Add prefix to struct member names in shader compiler
2024-11-02 12:13:23 +03:00
Thaddeus Crews
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
Yuri Rubinsky
1c86feee0a
Implement custom function overloading in shading language
2024-10-08 15:54:00 +03:00
Clay John
842f982397
Merge pull request #96819 from clayjohn/GLES3-instance-uniforms
...
Implement instance uniforms in Compatibility renderer
2024-10-07 13:41:47 -06:00
Dario
e2c6daf7ef
Implement asynchronous transfer queues, thread guards on RenderingDevice. Add ubershaders and rework pipeline caches for Forward+ and Mobile.
...
- Implements asynchronous transfer queues from PR #87590 .
- Adds ubershaders that can run with specialization constants specified as push constants.
- Pipelines with specialization constants can compile in the background.
- Added monitoring for pipeline compilations.
- Materials and shaders can now be created asynchronously on background threads.
- Meshes that are loaded on background threads can also compile pipelines as part of the loading process.
2024-10-02 15:11:58 -03:00
David Snopek
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
Chaosus
4a16a0d60c
Fix broken sky shader
2024-09-13 08:53:26 +03:00
Chaosus
7d9ced5311
Fix shader crash when using unary minus in expression
2024-09-11 16:46:09 +03:00
clayjohn
29df589632
Implement instance uniforms in Compatibility renderer
2024-09-10 12:20:47 -07:00
Yuri Rubinsky
af92fdb0ac
Add basic support to evaluate operator value in shader language
2024-09-09 15:12:11 +03:00
Yuri Rubinsky
e41048e16e
Fix texture samplers to not being last in the property list
2024-07-29 09:19:09 +03:00
clayjohn
ba3457dfff
Emit normal_roughness compatibility code in custom functions
2024-07-26 10:45:36 -07:00
Yuri Rubinsky
246a760323
Fix completion of functions with struct param/return type in shaders
2024-05-28 12:13:25 +03:00
A Thousand Ships
955d5affa8
Reduce and prevent unnecessary random-access to List
...
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)
* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
jsjtxietian
747ae429de
Add missing check when insert function normal_roughness_compatibility
2024-01-15 17:22:19 +08:00
Rémi Verschelde
6c390b620d
Merge pull request #84445 from Rubonnek/add-const-references-clang-tidy
...
Add const references detected by clang-tidy
2024-01-04 14:25:33 +01:00
clayjohn
43cf21cb71
Use best fit normals for storing screen space normals
2023-12-21 14:41:29 -07:00
Wilson E. Alvarez
a3cb1b096f
Add const references detected by clang-tidy
2023-12-16 13:36:44 -05:00
jsjtxietian
967e0e6485
Fix int to uint implicit cast error when use uniform mat in gles3
2023-10-27 10:46:52 +08:00
Rémi Verschelde
24c166dfe2
Merge pull request #81619 from Chaosus/fix_shader_const
...
Re-allows constants in global space to be initialized with function call
2023-10-03 17:20:23 +02:00
A Thousand Ships
fdd3d36c6d
[Servers] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable
2023-09-25 18:45:30 +02:00
Yuri Roubinski
d3d20f15bf
Re-allows constants in global space to be initialized with function call
2023-09-13 21:04:29 +03:00
Yuri Sizov
bb15241e06
Merge pull request #77740 from ChibiDenDen/simplify_vulkan
...
Replace sampler arrays with constant sampler elements, simplify and reuse code for all shaders
2023-07-12 17:16:12 +02:00
Yuri Sizov
5dff3c4484
Merge pull request #78538 from Sauermann/fix-code-simplifications
...
Remove unnecessary value assignments throughout the codebase
2023-07-12 15:09:26 +02:00
bitsawer
356297f909
Fix shader language float literal precision truncation
2023-07-03 12:48:33 +03:00
ChibiDenDen
35715e510f
replace sampler arrays with constant sampler elements
2023-06-22 01:11:57 +03:00
Markus Sauermann
890fdd56df
Code simplifications
...
CPPcheck found most of them.
no need to assign the variable twice:
- AnimationTrackEditTypeAudio
- SSEffects
variable is assigned in all if-else clauses:
- EditorHelp
- AndroidInputHandler
- MenuBar
- ShaderCompiler
same if clause:
- ItemList
clearing an empty bitfield has no effect:
- Viewport
2023-06-21 22:37:26 +02:00
Ninni Pipping
71ee65dc57
Enable shadow warnings and fix raised errors
2023-05-11 16:00:59 +02:00
Clay John
610877e326
Merge pull request #72288 from MewPurPur/use-string-repeat
...
Use `String.repeat()` to optimize several String methods
2023-05-05 09:56:48 -07:00
VolTer
6b84e258d2
Use String.repeat() in more places
2023-05-01 02:27:46 +02:00
Yuri Rubinsky
575e352a61
Fix to some operators in shaders are not compiled properly
2023-03-26 20:50:02 +03:00
clayjohn
6c1c71d68b
Avoid inserting screen_texture compatibility code when using textureSize
2023-02-10 13:03:02 -08:00
Bastiaan Olij
85c478e170
Make screen texture and depth texture work in Multiview
2023-01-25 13:35:01 +11: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
clayjohn
89766848de
Fix multiple issues that make the normal roughness texture unusable
2023-01-09 11:56:36 -08:00