dxvk-remix icon indicating copy to clipboard operation
dxvk-remix copied to clipboard

Fix alpha emissive visibility and make fog density threshold configurable

Open BinqAdams opened this issue 4 months ago • 6 comments

This PR fixes alpha emissive surfaces not being visible and makes the fog density threshold configurable for better game compatibility.

Alpha Emissive Fix:

Fixed timing issue where hasEmissive flag was set before material emissive radiance was calculated in geometry resolver Alpha emissive surfaces now properly participate in lighting calculations Resolves issue where transparent emissive materials were not visible

Fog Density Threshold Configuration:

Add configurable waterFogDensityThreshold RTX option with default 0.065f Replace hardcoded waterFogDensityThrehold constant in global volumetrics Maintains Portal RTX compatibility while allowing other games to adjust threshold Fixes issue where D3D fog end values <= 67 disabled volumetrics entirely

RTXDI Submodule Update:

Updates RTXDI submodule to include volumetric attenuation improvements Removes artificial distance clamps for physically correct volumetric attenuation Improves plane distance calculations using actual hit positions Better handling of rays extending beyond froxel grid maximum distance

BinqAdams avatar Aug 01 '25 23:08 BinqAdams

Before and After. The emissive lamps in the Before image are not attenuated by volumetrics, and are in the After image.

Before

Painkiller Screenshot 2025 08 03 - 00 44 55 68

After

Painkiller Screenshot 2025 08 03 - 00 39 13 17

BinqAdams avatar Aug 02 '25 15:08 BinqAdams

Before and After. The "Painting" in the background has a VERY small emissive value (0.1). It is entirely unattenuated by volumetrics. The After image shows the painting is attenuated (as well as the emissive lamps on the left).

Before

Painkiller Screenshot 2025 08 03 - 00 45 35 93

After

Painkiller Screenshot 2025 08 03 - 00 41 01 02

BinqAdams avatar Aug 02 '25 15:08 BinqAdams

Notes: Seems to exacerbate pre-existing Ray Reconstruction artifacts. Changing to model D reduces them. using rtx.rayreconstruction.combineSpecularAlbedo = False seems to eliminate the artifacts.

BinqAdams avatar Aug 03 '25 21:08 BinqAdams

REMIX-4508 for tracking

NV-LL avatar Aug 11 '25 20:08 NV-LL

Could you please merge/rebase to the latest main, there're lots of conflicts

xbei-nv avatar Oct 14 '25 23:10 xbei-nv

Also, did you submit your changes in the RTXDI? You need to merge the changes in RTXDI first, then update the submodule here.

xbei-nv avatar Nov 03 '25 19:11 xbei-nv