Thaddeus Crews
9dd6c4dbac
Merge pull request #112927 from allenwp/fix_clamping_in_tonemap_mobile
...
Fix inconsistent color clamping between Mobile and Forward+.
2025-11-25 12:55:13 -06:00
Allen Pestaluky
2c6749ab9a
Fix inconsistent color clamping between Mobile and Forward+.
...
Also remove inconsistencies with glow blending code and comments between the two shader files to allow for easier comparison of the two tonemap files.
2025-11-18 12:33:42 -05:00
blaqjack
d650ac8a96
TAA adjustment to reduce ghosting
2025-11-18 12:24:09 +01:00
Thaddeus Crews
46adcc6268
Merge pull request #112801 from clayjohn/premul-alpha-sss
...
Apply `PREMUL_ALPHA_FACTOR` only in non-split-specular shader variants.
2025-11-17 10:56:40 -06: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
79ffbfdf73
Reorganize canvas shader varyings in RD renderer
2025-11-14 22:29:28 -08:00
Thaddeus Crews
235d11245c
Merge pull request #112481 from stuartcarnie/2d_canvas_vbos
...
Massively optimize canvas 2D rendering by using vertex buffers
2025-11-14 14:23:02 -06:00
Stuart Carnie
90c0e6acca
2D: Switch to VBOs for instance data
...
- Add support for vertex bindings and UMA vertex buffers in D3D12.
- Simplify 2D instance params and move more into per-batch data to save
bandwidth
Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com >
Co-authored-by: Clay John <claynjohn@gmail.com >
Co-authored-by: A Thousand Ships <96648715+athousandships@users.noreply.github.com >
2025-11-15 06:25:49 +11:00
Thaddeus Crews
1ab8e9847d
Merge pull request #112494 from clayjohn/rd-fog-blend
...
Clean up Volumetric Fog blending behavior
2025-11-13 17:42:57 -06:00
Skyth
d27e4dab16
Sanitize INF/NaN when copying last frame texture for SSIL/SSR.
2025-11-13 16:38:54 +03: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
Thaddeus Crews
3c1e479290
Merge pull request #110077 from clayjohn/mobile-glow
...
Overhaul and optimize Glow in the mobile renderer
2025-10-31 09:23:32 -05:00
clayjohn
2e59cb41f4
Optimize glow and tonemap gather step in the mobile renderer
...
Mobile devices are typically bandwidth bound which means we need to do as few texture samples as possible.
They typically use TBDR GPUs which means that all rendering takes place on special optimized tiles. As a side effect, reading back memory from tile to VRAM is really slow, especially on Mali devices.
This commit uses a technique where you do a small blur while downsampling, and then another small blur while upsampling to get really high quality glow. While this doesn't reduce the renderpass count very much, it does reduce the texture read bandwidth by almost 10 times. Overall glow was more texture-read bound than memory write, bound, so this was a huge win.
A side effect of this new technique is that we can gather the glow as we upsample instead of gathering the glow in the final tonemap pass. Doing so allows us to significantly reduce the cost of the tonemap pass as well.
2025-10-30 21:56:26 -07:00
Rudolph Bester
ebd32c15ec
Fix Light2D none shadow filter to use nearest sampling
2025-10-30 19:12:17 +02: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
Thaddeus Crews
da593d0c16
Merge pull request #111897 from allenwp/environment-adj-prioritize-old-behaviour
...
Improve `Environment` adjustments (favor old behavior and quality).
2025-10-23 11:03:56 -05:00
Allen Pestaluky
0c7f013c55
Improve Environment color adjustments; specifically brightness and HDR 2D contrast.
...
This commit changes adjustments to behave as follows for all rendering configurations:
- Apply brightness to linear-encoded values, preventing contrast, saturation, and hue from being affected.
- Apply contrast to perceptually uniform (nonlinear sRGB-encoded) values, matching existing behavior when HDR 2D is disabled and producing optimal visual quality.
- Apply saturation with even color channel weights. This causes brightness of certain colors to change, but matches existing behavior when HDR 2D is disabled.
Adjustments are applied after glow and tonemapping to match existing behavior.
2025-10-23 11:08:49 -04: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
Clay John
36b92128b1
Merge pull request #110671 from allenwp/environment-glow-consistent
...
Blend glow before tonemapping and change default to screen.
2025-10-14 21:29:43 -07:00
Kaleb Reid
8173f43770
Apply luminance multiplier in copy_cubemap_to_panorama
2025-10-13 21:41:03 -07:00
Allen Pestaluky
cafc012b05
Blend Environment glow before tonemapping and change default blend mode to screen.
...
Additionally, change the minimum `tonemap_white` parameter to `1.0`; users can increase `tonemap_exposure` for a similar effect to decreasing `tonemap_white` below `1.0`.
Co-authored-by: Hei <40064911+Lielay9@users.noreply.github.com >
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro >
2025-10-10 12:08:08 -04:00
Allen Pestaluky
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
clayjohn
c7276273d8
Fix scene shader crash due to rename of view matrix and inverse view matrix
2025-10-07 13:36:23 -07:00
clayjohn
14b60f2264
Optimize vertex shader using mat3x4 to reduce bandwidth, load/store operations and ALUs
2025-09-26 23:20:08 -07:00
Thaddeus Crews
8c7c96e2c4
Merge pull request #108636 from clayjohn/MSAA-depth-mobile
...
Add depth resolve to the mobile renderer
2025-09-17 11:34:13 -05:00
Thaddeus Crews
e504943212
Merge pull request #110184 from Namey5/vertex-lighting-issue
...
Fix rounding error in clustered vertex light culling
2025-09-17 11:34:11 -05:00
Thaddeus Crews
6efa557e9b
Merge pull request #109567 from Flarkk/fix_spotlight_fog
...
Fix spotlight's shadow peter-panning with volumetric fog
2025-09-16 11:44:55 -05:00
clayjohn
0576b12699
Increase precision of SpotLight attenuation calculation to avoid driver bug on Intel devices
2025-09-09 13:18:55 -07:00
Alex Threlfo
60a7bed19c
Fix rounding error in clustered vertex light culling
2025-09-02 11:33:38 +10:00
Pāvels Nadtočajevs
f766e401db
[MSDF] Fix outline bleed out at small sizes.
2025-08-31 23:35:33 +03:00
Thaddeus Crews
aa0c7bb840
Merge pull request #109970 from allenwp/add-debanding-smaa-before-spatial-upscaler
...
Add debanding to SMAA and apply debanding before spatial upscalers.
2025-08-26 19:01:11 -05:00
clayjohn
4b84207d2f
Use vertex shader workaround for Mali GXX GPUs for glow shader
...
We applied this same workaround to the tonemap shader and DoF, but didn't apply it to glow since the bug didn't manifest on our test devices.
2025-08-26 11:31:22 -07:00
Allen Pestaluky
5a3e69d16e
Add debanding to SMAA and apply debanding before spatial upscalers.
2025-08-25 16:55:36 -04:00
Stuart Carnie
90c9134875
Metal: Read gl_ViewIndex for multi-view subpasses
...
This is necessary to ensure the SpvCapabilityMultiView is included in
the SPIR-V, informing downstream transpilers, like Metal, that it should
enable multi-view capabilities in the generated Metal shader source.
2025-08-23 09:12:17 +10:00
Pāvels Nadtočajevs
6a3941b5d9
Fix MSDF outline size clamping.
2025-08-19 08:28:33 +03:00
Florent Guiocheau
199161f023
Fix spotlight's shadow with volumetric fog
2025-08-13 09:28:06 +02:00
devloglogan
fb829bdd08
Fix mobile renderer motion vectors regression
2025-08-12 16:45:31 -05:00
Pāvels Nadtočajevs
86e61a311f
Use MSDF instead of MTSDF for font rendering.
...
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com >
2025-08-09 10:41:16 +03:00
Dario
b962b38e74
Check for Vulkan Memory Model support and make it a variant.
2025-07-25 09:24:58 -03:00
Allen Pestaluky
a033656eda
Fix debanding for Mobile rendering method with HDR 2D.
2025-07-24 16:11:49 -04:00
Juan Manuel Costello
5dc25db6da
Fix lightmap dynamic objects with physical lights
2025-07-17 20:58:03 -03:00
clayjohn
a8efa55bed
Add depth resolve to the mobile renderer
2025-07-16 20:37:39 -07:00
Thaddeus Crews
2be2cbb720
Merge pull request #107782 from allenwp/vulkan-nonlinear-color-correction-dithering
...
Always perform color correction and debanding on nonlinear sRGB values.
2025-07-14 10:30:28 -05:00
Pāvels Nadtočajevs
a8873727ac
[macOS] Selectively bake specific shader variants for MoltenVK.
2025-07-09 20:09:56 +03:00
Allen Pestaluky
a1591512f8
Always perform color correction and debanding on nonlinear sRGB values.
...
Fixes #107730
Co-authored-by: LuoZhihao <luo_zhihao@outlook.com >
2025-07-08 13:44:53 -04:00
Mingxi Zhang
2096e4c007
Fix division by zero in clearcoat
...
Prevents the clearcoat model from generating NaN values at grazing angles
2025-07-08 01:58:37 +00:00
Stuart Carnie
5230f6c60c
Apple: Use image atomic operations on supported Apple hardware
...
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com >
2025-07-05 05:59:00 +10:00
Dario
4921a3e711
Fix VVL errors by changing frag_color to FP32 and dFdx/y.
2025-06-26 13:42:17 -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