Skip to content

Conversation

@BinqAdams
Copy link

@BinqAdams BinqAdams commented Aug 1, 2025

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

…able

Fix alpha emissive surfaces not being visible due to timing issue where hasEmissive flag was set before material emissive radiance was calculated in geometry resolver

Add configurable waterFogDensityThreshold RTX option with default 0.065f to replace hardcoded value, maintaining Portal RTX compatibility while allowing other games to adjust the threshold

Fixes issue where D3D fog end values <= 67 disabled volumetrics entirely
@BinqAdams BinqAdams force-pushed the fix/alpha-emissives-and-fog-threshold branch from 6f8febd to c32e8f2 Compare August 2, 2025 00:46
Points to commit fdac3da which includes:
Remove artificial distance clamps for physically correct volumetric attenuation
Improve plane distance calculations using actual hit positions
Better handling of rays extending beyond froxel grid
Add explanatory comments for architectural decisions
@BinqAdams BinqAdams force-pushed the fix/alpha-emissives-and-fog-threshold branch from c32e8f2 to 05188fe Compare August 2, 2025 01:08
@BinqAdams
Copy link
Author

BinqAdams commented Aug 2, 2025

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
Copy link
Author

BinqAdams commented Aug 2, 2025

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
Copy link
Author

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.

@NV-LL
Copy link
Collaborator

NV-LL commented Aug 11, 2025

REMIX-4508 for tracking

@xbei-nv
Copy link
Collaborator

xbei-nv commented Oct 14, 2025

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

@xbei-nv
Copy link
Collaborator

xbei-nv commented Nov 3, 2025

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

@BinqAdams BinqAdams marked this pull request as draft November 4, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants