Clay John
2343d36b43
Use transmittance instead of opacity in the early-out branch when calculating volumetric fog
2026-02-09 09:45:12 -08:00
LiveTrower
60097eb3ce
clearcoat fixes and improvements
2026-01-27 18:02:01 -06:00
Thaddeus Crews
4738ce72e3
Merge pull request #115026 from rothej/fix-94567-fog-shader-compilation-with-fog-disabled
...
Fix shader compilation error when writing to `FOG` when `render_mode fog_disabled`
2026-01-26 13:14:27 -06:00
Bastiaan Olij
aac883849e
Apply fixed size properly for mono/stereo rendering.
2026-01-20 23:19:45 +11:00
Joshua Rothe
7a2f188382
Fixing shader compilation error when writing to FOG when render_mode fog_disabled.
...
Always declares FOG variable regardless of fog state. Previously, only declared
fog if FOG_DISABLED was undefined. This caused errors if the code tried to
write to fog later. Exists as a dummy variable when unused.
Signed-off-by: Joshua Rothe <joshrothe@gmail.com >
2026-01-16 02:12:52 -07:00
Skyth
614d0e2f0d
Prevent SSR from getting affected by specular occlusion.
2026-01-08 11:41:21 +03:00
Skyth
c1d7c097b1
Pass consistent viewport and screen sizes to fix point size emulation.
2025-12-19 14:51:49 +03:00
Dario
c78c3ba894
Rewrite Radiance and Reflection probes to use Octahedral maps.
...
Co-authored-by: clayjohn <claynjohn@gmail.com >
2025-12-02 17:48:12 -08:00
Skyth
ba556ebe03
Implement point size emulation in the forward shader for D3D12.
2025-12-02 17:36:31 +03:00
clayjohn
a7e1a65ca8
Apply PREMUL_ALPHA_FACTOR only in non-split-specular shader variants.
...
This avoids a shader compile error when using SSS and PREMUL_ALPHA_FACTOR in the same shader.
This doesn't change any functionaility, since in practive, the split-specular shader variant is only ever used for opaque objects while using premul alpha makes the object non-opaque
2025-11-14 23:17:17 -08:00
clayjohn
8ee3897048
Clean up Volumetric Fog blending behavior
...
Use proper blending everywhere to be consistent and avoid multiplying by opacity twice.
2025-11-07 11:11:44 -08:00
Colby Klein
bdbbed8ea9
Revise fog blending to fix over-darkening/borders.
...
This can result in low fog densities being a bit brighter, which may need slight adjustment in your scenes.
In exchange, volumetrics now blend smoothly together with the scene and regular fog.
Fixes #101514
2025-10-24 13:15:26 -07:00
clayjohn
f61ee7bdf6
Use half float precision buffer for 3D when HDR2D is enabled
...
This is necessary for Environment effects like Glow to work correctly.
2025-10-21 13:44:46 -07:00
Skyth
c128886c63
Overhaul screen space reflections.
2025-10-21 19:23:38 +03:00
clayjohn
14b60f2264
Optimize vertex shader using mat3x4 to reduce bandwidth, load/store operations and ALUs
2025-09-26 23:20:08 -07:00
Alex Threlfo
60a7bed19c
Fix rounding error in clustered vertex light culling
2025-09-02 11:33:38 +10:00
Juan Manuel Costello
5dc25db6da
Fix lightmap dynamic objects with physical lights
2025-07-17 20:58:03 -03:00
Thaddeus Crews
01410f19f8
Merge pull request #107876 from clayjohn/vs-data-issues
...
Fix a few improper memory accesses in the clustered forward vertex shader
2025-06-24 18:34:25 -05:00
celyk
7f9b8dae4f
Use double emulation on modelview
2025-06-24 15:37:18 +10:00
clayjohn
b4adaa291a
Fix a few improper memory accesses in the clustered forward vertex shader
...
draw_call.instance_index should not be used directly since it doesn't take into account auto-batching
scene_data_block.data should not be used directly in the vertex shader since it can change between frames and impact motion vector generation
IN_SHADOW_PASS can only be accessed inside functions, so it needs to be a global and not a constant
2025-06-22 23:41:03 -07:00
LuoZhihao
8a2fd98004
Forward+: Fix builtins in light shader
2025-06-17 20:14:53 +08:00
Dario
46277836a6
Optimize Mobile renderer by using FP16 explicitly.
2025-06-09 14:39:35 -03:00
SaracenOne
761d5474dc
Shader compilation fix:
...
Fix shader compilation crash on custom shaders
using VIEW_INDEX on Vulkan Clustered Forward
renderer.
2025-06-08 03:29:47 +01:00
Thaddeus Crews
de37627404
Merge pull request #102552 from DarioSamo/shader-baker
...
Add shader baker to project exporter.
2025-05-28 17:09:38 -05:00
Dario
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
Alfonso Grimaldo
e1e1933244
fix missing ibl reconstruction from dfg multiscattering
2025-05-24 20:10:02 -06:00
clayjohn
9a1def8da1
Add new StandardMaterial properties to allow users to control FPS-style objects (hands, weapons, tools close to the camera)
...
Add new shader built in Z_CLIP_SCALE to easily adjust clipping distance to avoid clipping walls etc.
Add fov_override to StandardMaterial3D to easily have a custom FOV for FPS objects
Add IN_SHADOW_PASS built-in to shaders for tweaking materials without impacting shadow maps
2025-05-21 10:16:05 -03:00
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
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
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
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
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
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