Commit Graph

112 Commits

Author SHA1 Message Date
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
bd9d1bf070 Add material debanding for use in Mobile rendering method.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2025-10-08 16:22:41 -04:00
14b60f2264 Optimize vertex shader using mat3x4 to reduce bandwidth, load/store operations and ALUs 2025-09-26 23:20:08 -07:00
fb829bdd08 Fix mobile renderer motion vectors regression 2025-08-12 16:45:31 -05:00
5dc25db6da Fix lightmap dynamic objects with physical lights 2025-07-17 20:58:03 -03:00
4921a3e711 Fix VVL errors by changing frag_color to FP32 and dFdx/y. 2025-06-26 13:42:17 -03:00
7f9b8dae4f Use double emulation on modelview 2025-06-24 15:37:18 +10:00
ea75954575 Vulkan Mobile: Fix writing vertex color in spatial shader 2025-06-23 21:30:48 +08:00
8804c88443 Change all interpolators to FP32 in mobile renderer. 2025-06-11 15:36:22 -03:00
a1ef1130ad Merge pull request #107364 from DarioSamo/adreno-fix-interpolators
Upgrade normal interpolators to FP32 to fix Adreno.
2025-06-10 17:56:29 +02:00
e53b67df03 Upgrade normal interpolators to FP32 to fix Adreno. 2025-06-10 12:26:58 -03:00
951ca21f02 Vulkan Mobile: Fix crash from shader compilation with USE_RADIANCE_CUBEMAP_ARRAY 2025-06-10 09:19:32 -05:00
46277836a6 Optimize Mobile renderer by using FP16 explicitly. 2025-06-09 14:39:35 -03:00
56c2ce00d6 Fix crash when using VIEW_INDEX in shader with Vulkan mobile renderer 2025-06-06 07:03:35 -05:00
3b70fbdc3c Implement motion vectors in mobile renderer 2025-05-30 13:09:54 -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
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
ff3ababb09 Reduce amount of permutations in mobile shader. 2025-05-16 12:40:21 -03:00
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
be01c7f5a4 fix reflection probe box projection stretching 2025-05-14 00:02:06 +02:00
9828c365c3 Add support for bent normals for indirect lighting and specular occlusion 2025-05-12 12:52:04 +02:00
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
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
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
56730d0cb2 Add specular occlusion from ambient light
Co-authored-by: guerro323 <kaltobattle@gmail.com>
2025-05-08 23:52:01 +02:00
44408eabaa Replace BRDF approximation with a DFG LUT 2025-05-08 10:23:35 -06:00
e3dbf74634 Fix reflection probe dark borders 2025-04-29 17:18:52 +02:00
5640ddd0a5 Scene shader: Improve and document SH evaluation for light probes 2025-04-19 15:08:02 +02:00
8714b36171 Fix rendering material when UV2 is compressed 2025-02-06 20:24:46 +01:00
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
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
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
1637736c20 ReflectionProbe priority 2024-12-23 21:58:11 +01:00
1536e0e236 Merge pull request #100441 from StaydMcMuffin/scene-shaders-tbn-fixes
Scene Shaders - TBN Vector Fixes
2024-12-19 19:59:58 -06:00
2fcd8223e8 Merge pull request #99538 from Geometror/lightmap-gi-transparent-surface
Add transparency support for LightmapGI
2024-12-19 19:59:52 -06:00
a3525bc015 Add transparency support for LightmapGI
Co-authored-by: Guerro323 <kaltobattle@gmail.com>
2024-12-18 19:36:16 +01:00
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
e42def12d0 Implement per-light Specular property in DirectionalLight3D 2024-12-16 19:18:18 +01:00
189c8eb671 Implement shadowmasks for LightmapGI
Co-authored-by: dearthdev <nathandearthdev@gmail.com>
2024-12-12 11:00:28 +01:00
9320865796 Avoid calculating dynamic lights when lights are baked into LightmapGI using the static bake mode 2024-12-06 10:17:44 -08:00
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
fa7615be9e Add specialization for directional light split blend and fog. 2024-12-03 15:12:46 -03:00
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
a64b3fd3f8 Allow SCREEN_UV to be used in light function of spatial shader 2024-11-19 11:39:49 +03:00
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
53099c56f0 Add multiple specialization constants to Forward+ and Mobile. 2024-11-04 14:35:40 -03:00
427ba09efc Fix soft shadows by increasing the bit count for specialization constants. 2024-10-28 10:26:50 -03:00
cef515506b Move preprocessor to end of line for iterator, remove redeclaration incompatible with ubershader method definitions 2024-10-14 22:19:16 +01:00
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
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