1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00
Commit Graph

536 Commits

Author SHA1 Message Date
yesfish
93bc18f2b0 Fix 2D instance params crashing using outside of main() 2025-02-27 22:10:56 +00:00
Rémi Verschelde
0bccb0abd1 Merge pull request #102497 from BlueCube3310/mesh-uv-render-compressed-fix
Fix rendering material when UV2 is compressed
2025-02-07 01:40:02 +01:00
Rémi Verschelde
46aeded4b7 Merge pull request #102480 from DarioSamo/dont-unroll-ubershader
Add loop annotations to ubershaders to prevent loop unrolling.
2025-02-07 01:39:48 +01:00
Rémi Verschelde
c695eb9159 Merge pull request #101952 from Flarkk/fix_spotlight_peterpanning_regression
Fix shadow peter-panning with default spotlight
2025-02-07 01:39:15 +01:00
BlueCube3310
8714b36171 Fix rendering material when UV2 is compressed 2025-02-06 20:24:46 +01:00
Dario
d39ac94c41 Add loop annotations to ubershaders to prevent loop unrolling. 2025-02-06 09:39:18 -03:00
clayjohn
6611c863bd Use a smaller epsilon for omni and spot attenuation cutoff
We just want to avoid calculating shadows when the attenuation is zero, so we should use the smallest epsilon we can get away with
2025-01-31 17:08:23 -08:00
MathdudeMan
964cd6525e Fix: Mass property particle shader error 2025-01-28 21:00:26 -05:00
Thaddeus Crews
5ac6bce58d Merge pull request #102105 from clayjohn/SDFGI-unflip-normal
Avoid flipping normal based on facing direction when calculating SDF
2025-01-28 09:03:34 -06:00
clayjohn
a525e30c27 Avoid flipping normal based on facing direction when calculation SDF. This shader runs for multiple directions, so the flip direction won't be accurate and just creates bad normals 2025-01-27 16:48:29 -08:00
Florent Guiocheau
d08ff57148 Fix peter-panning with default spotlight 2025-01-22 17:05:04 +01:00
Allen Pestaluky
c5cf73a2e7 Optimize AgX tonemapper's handling of negative values
This change improves performance of the AgX tonemapper by allowing two matrix multiplications to be combined into one. This comes at the cost of loss of color information that could be correctly interpreted as positive RGB values in the Rec. 2020 color space. Additionally, an insignificant amount of error is intentionally introduced to the input color value to prevent the need for a second max function call before log2. The final negative color clipping has been removed to allow the tonemapper to return negative RGB values, similar to other tonemappers in Godot.
2025-01-13 17:35:35 -05:00
Allen Pestaluky
77ddaaaa91 Fix AgX sigmoid contrast curve approximation
This changes the polynomial function so that a lower input always results in a lower output and vice-versa. Additionally, the new function returns a value that is much closer to 1.0 when given an input of 1.0.
2025-01-10 18:17:38 -05:00
Rémi Verschelde
03c83cea1e Style: Enable clang-format's InsertBraces config
This was part of our style guide since we started using clang-format
but the feature was only added in clang-format 15, and we hadn't
noticed it yet.
2025-01-09 16:46:51 +01:00
Rémi Verschelde
21721ae344 Merge pull request #87260 from Calinou/tonemap-add-agx
Add AgX tonemapper option to Environment
2025-01-08 18:20:03 +01:00
Hugo Locurcio
084e84be78 Add AgX tonemapper option to Environment
Technical implementation notes:

- Moved linearization step to before the outset matrix is applied and
  changed polynomial contrast curve approximation.
  - This does *not* implement Blender's chroma rotation to address hue shift.
    This hue rotation was found to have a significant performance impact.
- Improved performance by combining the AgX outset matrix with the Rec 2020 matrix.

Co-authored-by: Allen Pestaluky <allenpestaluky@gmail.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
2025-01-08 17:01:16 +01:00
Aarni Koskela
f134769506 Fix various typos
* Add TODO notes for typos that should be fixed for 5.0

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-08 14:47:42 +02:00
Rémi Verschelde
084da581be Merge pull request #100241 from lander-vr/reflection-probe-priority
Add priority-based blending to reflection probes.
2025-01-07 10:14:38 +01:00
Stuart Carnie
11dc4f2e5e Metal: Add MetalFX upscaling support
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2025-01-06 06:03:18 -07:00
Stayd
40f17127ef Fix User-supplied Normals Being Ignored
Moves the initialization of the geo_normal value
to after the user shader code, so that the normal
supplied by the user is actually used instead of
the interpolated vertex normal.
2024-12-27 13:01:20 -07:00
landervr
1637736c20 ReflectionProbe priority 2024-12-23 21:58:11 +01:00
Thaddeus Crews
1536e0e236 Merge pull request #100441 from StaydMcMuffin/scene-shaders-tbn-fixes
Scene Shaders - TBN Vector Fixes
2024-12-19 19:59:58 -06:00
Thaddeus Crews
2fcd8223e8 Merge pull request #99538 from Geometror/lightmap-gi-transparent-surface
Add transparency support for LightmapGI
2024-12-19 19:59:52 -06:00
Thaddeus Crews
4665faaaa9 Merge pull request #100427 from Namey5/fog-sky-luminance
Separate sky luminance and brightness calculations for consistent fog
2024-12-19 19:59:50 -06:00
Thaddeus Crews
41b468f961 Merge pull request #100544 from Namey5/sdfgi-sky-rotation
Support custom sky rotation in SDFGI
2024-12-19 19:59:46 -06:00
Thaddeus Crews
d3e5b62ea2 Merge pull request #99230 from paddy-exe/instance_uniforms_compatability_renderer
Implement 2D instance uniforms
2024-12-19 19:59:37 -06:00
Alex Threlfo
e4fd2f003f Support custom sky rotation in SDFGI 2024-12-20 11:26:28 +11:00
Alex Threlfo
5f617663aa fix: separate sky luminance and user brightness calculations around fog 2024-12-20 11:25:11 +11:00
Hendrik Brucker
a3525bc015 Add transparency support for LightmapGI
Co-authored-by: Guerro323 <kaltobattle@gmail.com>
2024-12-18 19:36:16 +01:00
kobewi
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
Rémi Verschelde
190ae9f9dc Merge pull request #100302 from clayjohn/light2d-optimize
Optimize PointLight2D shadow rendering by reducing draw calls and RD state changes
2024-12-17 22:59:54 +01:00
clayjohn
7c61252dd7 Optimize PointLight2D shadow rendering by reducing draw calls and RD state changes.
This dramatically reduces the CPU time spent on rendering shadows for PointLight2Ds
2024-12-17 07:41:09 -08:00
Stayd
ed0e3d7da8 Scene Shaders - TBN Fixes
Fixes two errors related to the normal, tangent,
and bitangent vectors, namely normals not always
being inverted on backfaces, and normalization
being reversed from what MikkTSpace expects.
2024-12-16 22:36:23 -07:00
Andrew_Shobbrook
e42def12d0 Implement per-light Specular property in DirectionalLight3D 2024-12-16 19:18:18 +01:00
clayjohn
356fa37f89 Small fixups for the new reflection probe blending 2024-12-12 17:29:21 -08:00
Thaddeus Crews
7c015a768f Merge pull request #99958 from lander-vr/reflection-probe-blend-property
Add Blend Distance property to ReflectionProbe
2024-12-12 16:13:32 -06:00
Rémi Verschelde
562dd1ad85 Merge pull request #100305 from clayjohn/directional-light-2d-mask
Remove positional light mask from directional lights in Canvas Item shaders.
2024-12-12 14:10:24 +01:00
BlueCube3310
189c8eb671 Implement shadowmasks for LightmapGI
Co-authored-by: dearthdev <nathandearthdev@gmail.com>
2024-12-12 11:00:28 +01:00
clayjohn
f8827271d7 Remove positional light mask from directional lights in Canvas Item shaders. 2024-12-12 00:20:07 -08:00
Thaddeus Crews
25122e7dd3 Merge pull request #100081 from clayjohn/rd-clearcoat
Ensure schlick is available when using clearcoat with GGX
2024-12-10 14:16:07 -06:00
clayjohn
9320865796 Avoid calculating dynamic lights when lights are baked into LightmapGI using the static bake mode 2024-12-06 10:17:44 -08:00
clayjohn
f92018288f Ensure schlick is available when using clearcoat with GGX 2024-12-05 19:11:03 -08:00
landervr
05010180ce ReflectionProbe add Blend Distance 2024-12-05 23:29:47 +01:00
Thaddeus Crews
637239e979 Merge pull request #94193 from BastiaanOlij/buildin_includes
Add ability to include built-in include files
2024-12-05 14:12:23 -06:00
Thaddeus Crews
f5d82af1fd Merge pull request #99136 from DarioSamo/light-compute-attenuation-skip
Improve performance of shader lighting code in Forward renderers.
2024-12-05 14:12:08 -06:00
Thaddeus Crews
a4c2e16c19 Merge pull request #100028 from clayjohn/rd-lights-array
Use a vector instead of an array in canvas shader instance buffer
2024-12-05 14:12:05 -06:00
clayjohn
e316739a13 Use a vector instead of an array in canvas shader instance buffer.
This avoids a pathological performance cliff on Adreno devices
2024-12-04 16:36:46 -08:00
Dario
fa7615be9e Add specialization for directional light split blend and fog. 2024-12-03 15:12:46 -03:00
Thaddeus Crews
c58ae91efa Merge pull request #99220 from Flarkk/fix_sss_reverse_z
Fix regression in SSS with reverse-z
2024-11-27 10:46:56 -06:00
Dario
0ce4c6dac3 Improve performance of shader lighting code in Forward renderers.
- Skip sampling shadows if attenuation is very small.
- Skip computing diffuse and specular light if attenuation and shadow are very small.
2024-11-27 12:20:31 -03:00