1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00
Commit Graph

94 Commits

Author SHA1 Message Date
Thaddeus Crews
d0693d6867 Merge pull request #89988 from LunaCapra/specular-occlusion
Add support for bent normal maps for specular occlusion and indirect lighting
2025-05-14 09:44:06 -05:00
landervr
be01c7f5a4 fix reflection probe box projection stretching 2025-05-14 00:02:06 +02:00
Capry
9828c365c3 Add support for bent normals for indirect lighting and specular occlusion 2025-05-12 12:52:04 +02:00
Thaddeus Crews
19bb18716e Merge pull request #102399 from clayjohn/cull-mask-overhaul
Overhaul the cull mask internals for Lights, Decals, and Particle Colliders
2025-05-09 11:29:28 -05:00
Thaddeus Crews
dda0562f2f Merge pull request #103934 from LiveTrower/dfg-lut
Forward+: Replace the current BRDF approximation with a DFG LUT and add multiscattering energy compensation
2025-05-09 11:29:16 -05:00
clayjohn
305216f558 Overhaul the cull mask internals for Lights, Decals, and Particle Colliders
Properly pair and unpair instances based on cull mask to avoid any unnecessary processing and to ensure that changing the cull_mask and layer_mask actually updates culling behavior
2025-05-08 21:39:12 -07:00
landervr
56730d0cb2 Add specular occlusion from ambient light
Co-authored-by: guerro323 <kaltobattle@gmail.com>
2025-05-08 23:52:01 +02:00
LiveTrower
44408eabaa Replace BRDF approximation with a DFG LUT 2025-05-08 10:23:35 -06:00
landervr
e3dbf74634 Fix reflection probe dark borders 2025-04-29 17:18:52 +02:00
BlueCube3310
5640ddd0a5 Scene shader: Improve and document SH evaluation for light probes 2025-04-19 15:08:02 +02:00
BlueCube3310
8714b36171 Fix rendering material when UV2 is compressed 2025-02-06 20:24:46 +01: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
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
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
Hendrik Brucker
a3525bc015 Add transparency support for LightmapGI
Co-authored-by: Guerro323 <kaltobattle@gmail.com>
2024-12-18 19:36:16 +01: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
BlueCube3310
189c8eb671 Implement shadowmasks for LightmapGI
Co-authored-by: dearthdev <nathandearthdev@gmail.com>
2024-12-12 11:00:28 +01: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
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
Dario
fa7615be9e Add specialization for directional light split blend and fog. 2024-12-03 15:12:46 -03: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
Chaosus
a64b3fd3f8 Allow SCREEN_UV to be used in light function of spatial shader 2024-11-19 11:39:49 +03:00
clayjohn
2c158c386b Normalize normal tangent and binormal before interpolating in the mobile renderer to avoid precision errors on heavily scaled meshes 2024-11-13 12:24:28 -08:00
Dario
53099c56f0 Add multiple specialization constants to Forward+ and Mobile. 2024-11-04 14:35:40 -03:00
Dario
427ba09efc Fix soft shadows by increasing the bit count for specialization constants. 2024-10-28 10:26:50 -03:00
EnlightenedOne
cef515506b Move preprocessor to end of line for iterator, remove redeclaration incompatible with ubershader method definitions 2024-10-14 22:19:16 +01: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
ywmaa
0a9ad8f9de Implement vertex shading
This adds support in all backends, but the Compatibility renderer works the best.
Mobile and Forward+ can only support one directional light shader (the first in the tree)
While the Compatibility renderer supports any number of shadows.

Co-authored-by: Clay John <claynjohn@gmail.com>
2024-09-29 00:36:09 +02:00
Rémi Verschelde
bfe74eca3b Merge pull request #97428 from clayjohn/shadow-filter-jitter-rebase
Jitter shadow map dithering pattern across frames when TAA is enabled
2024-09-26 12:45:50 +02:00
Thaddeus Crews
9f9ee0c813 SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
Hugo Locurcio
0eb06da057 Jitter shadow map dithering pattern across frames when TAA is enabled
This improves shadow quality by reducing the visibility of the noisy
pattern caused by dithering.

This jittering also applies when FSR2 is enabled, as it provides its own
form of temporal antialiasing.

Co-authored-by: Clay John <claynjohn@gmail.com>
2024-09-24 15:52:07 -07:00
Thaddeus Crews
b37fc1014a Style: Apply new clang-format changes 2024-09-20 08:09:48 -05:00
BlueCube3310
a89f4fa5a9 LightmapGI: Pack L1 SH coefficients for directional lightmaps 2024-09-05 22:46:58 +02:00
Chaosus
f538376c3b Add CLIP_SPACE_FAR built-in to spatial shader 2024-08-27 08:48:46 +03:00
Rémi Verschelde
68d188d521 Merge pull request #95888 from clayjohn/Lightmap-SH-coefficients
Use correct lightmap coefficients to ensure that the directional lightmap mode looks correct
2024-08-25 20:18:18 +02:00
clayjohn
f4ccba7508 Use correct lightmap coefficients to ensure that the directional lightmap mode looks correct
Also remove the metallic option from directional lightmap as it is guaranteed to return negative numbers in many cases
2024-08-21 10:24:32 -07:00
Rémi Verschelde
8acd82f70e Merge pull request #89919 from BlueCube3310/bicubic-lightmap
Implement bicubic sampling for lightmaps
2024-08-20 10:01:41 +02:00
Rémi Verschelde
333f0f910f Merge pull request #86000 from jsjtxietian/add-missing-model_normal_matrix
Add `model_normal_matrix` for fragment shader
2024-08-20 10:01:36 +02:00
jsjtxietian
e698351db2 Add model_normal_matrix for fragment shader 2024-08-20 12:39:29 +08:00
Rémi Verschelde
824a97120e Merge pull request #92213 from clayjohn/ambient-disabled
Disable all sources of ambient light when `ambient_light_disabled` render mode is used
2024-08-19 12:08:31 +02:00
BlueCube3310
ef9bb1a207 Implement support for bicubic lightmap filtering
Co-authored-by: Calinou <hugo.locurcio@hugo.pro>
2024-08-19 09:52:09 +02:00
jsjtxietian
970a237c20 Fix undefined alpha_scissor in standard shader 2024-08-15 11:44:11 +08:00
Pedro J. Estébanez
0064532c1e Fix position from vertex shader partially uninitialized 2024-07-23 09:04:54 +02:00
clayjohn
4cbc967f50 Use a spec constant to control whether the MultiMesh branch is used in the vertex shader.
This works around a bug on the Quest3 and slightly improves performance on all mobile devices at the cost of increased pipeline count.
2024-07-12 15:44:06 -07:00
clayjohn
6fbef0669d Disable all sources of ambient light when ambient_light_disabled render mode is used 2024-05-21 10:42:12 -07:00
QbieShay
e41064388e reverted naming to premul alpha (no T)
Initially 3d had premulT alpha as a keyword.
Since Canvas item uses mixed premul and premult as keywords,
3D is changed as well to keep consistency with 2D.
Unfortunately this keeps inconsistency with the internal ENUM.
2024-05-01 22:24:49 +02:00