Skip to content

Commit

Permalink
NRD updated to v4.11.3:
Browse files Browse the repository at this point in the history
- PT: hooked up "NRD_MaterialFactors"
- PT: improved glass
- PT: SHARC usage for specular made lobe-footprint-based instead of "smc"-based
- UI: added "Glass" checkbox, transforming some cubes into glass!
- added "NRD_RESTORE_INITIAL_STATE" switch
- added CPU-side performance markers
- better stated geometry flags
- NRI updated to v1.158
- updated deps
- updated tests
  • Loading branch information
dzhdanNV committed Jan 3, 2025
1 parent 1055e49 commit b520f26
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 85 deletions.
2 changes: 1 addition & 1 deletion External/NRD
Submodule NRD updated 53 files
+1 −1 External/MathLib
+1 −1 External/ShaderMake
+2 −2 Include/NRD.h
+9 −5 Include/NRDSettings.h
+17 −6 Integration/NRDIntegration.h
+126 −24 Integration/NRDIntegration.hpp
+1 −1 README.md
+1 −1 Resources/Version.h
+18 −0 Shaders/Include/Common.hlsli
+52 −1 Shaders/Include/NRD.hlsli
+3 −1 Shaders/Include/REBLUR_Blur.hlsli
+4 −0 Shaders/Include/REBLUR_Config.hlsli
+3 −1 Shaders/Include/REBLUR_Copy.hlsli
+17 −3 Shaders/Include/REBLUR_HistoryFix.hlsli
+3 −1 Shaders/Include/REBLUR_HitDistReconstruction.hlsli
+4 −2 Shaders/Include/REBLUR_PostBlur.hlsli
+4 −2 Shaders/Include/REBLUR_PrePass.hlsli
+3 −1 Shaders/Include/REBLUR_SplitScreen.hlsli
+38 −26 Shaders/Include/REBLUR_TemporalAccumulation.hlsli
+3 −1 Shaders/Include/REBLUR_TemporalStabilization.hlsli
+4 −2 Shaders/Include/RELAX_AntiFirefly.hlsli
+4 −2 Shaders/Include/RELAX_Atrous.hlsli
+5 −3 Shaders/Include/RELAX_AtrousSmem.hlsli
+2 −1 Shaders/Include/RELAX_Config.hlsli
+3 −1 Shaders/Include/RELAX_Copy.hlsli
+3 −1 Shaders/Include/RELAX_HistoryClamping.hlsli
+5 −3 Shaders/Include/RELAX_HistoryFix.hlsli
+4 −2 Shaders/Include/RELAX_HitDistReconstruction.hlsli
+6 −4 Shaders/Include/RELAX_PrePass.hlsli
+3 −1 Shaders/Include/RELAX_SplitScreen.hlsli
+7 −4 Shaders/Include/RELAX_TemporalAccumulation.hlsli
+12 −2 Shaders/Include/SIGMA_Blur.hlsli
+2 −0 Shaders/Include/SIGMA_Config.hlsli
+3 −1 Shaders/Include/SIGMA_Copy.hlsli
+2 −1 Shaders/Include/SIGMA_SmoothTiles.hlsli
+3 −1 Shaders/Include/SIGMA_SplitScreen.hlsli
+4 −2 Shaders/Include/SIGMA_TemporalStabilization.hlsli
+0 −1 Shaders/Resources/REBLUR_Blur.resources.hlsli
+0 −1 Shaders/Resources/REBLUR_PostBlur.resources.hlsli
+0 −1 Shaders/Resources/REBLUR_PrePass.resources.hlsli
+0 −1 Shaders/Resources/RELAX_PrePass.resources.hlsli
+0 −1 Shaders/Resources/SIGMA_Blur.resources.hlsli
+3 −1 Shaders/Source/Clear_Float.cs.hlsl
+3 −1 Shaders/Source/Clear_Uint.cs.hlsl
+64 −6 Shaders/Source/REBLUR_Validation.cs.hlsl
+3 −1 Shaders/Source/REFERENCE_Copy.cs.hlsl
+3 −1 Shaders/Source/REFERENCE_TemporalAccumulation.cs.hlsl
+3 −1 Shaders/Source/RELAX_Validation.cs.hlsl
+59 −26 Source/InstanceImpl.cpp
+3 −3 Source/InstanceImpl.h
+9 −11 Source/Reblur.cpp
+5 −5 Source/Relax.cpp
+4 −4 Source/Sigma.cpp
2 changes: 1 addition & 1 deletion External/NRIFramework
15 changes: 7 additions & 8 deletions Shaders/Composition.cs.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -197,20 +197,19 @@ void main( int2 pixelPos : SV_DispatchThreadId )
spec.xyz *= gIndirectSpecular;

// Material modulation ( convert radiance back into irradiance )
float NoV = abs( dot( N, V ) );
float3 Fenv = BRDF::EnvironmentTerm_Rtg( Rf0, NoV, roughness );
float3 diffDemod = ( 1.0 - Fenv ) * albedo * 0.99 + 0.01;
float3 specDemod = Fenv * 0.99 + 0.01;
float3 diffFactor, specFactor;
NRD_MaterialFactors( N, V, albedo, Rf0, roughness, diffFactor, specFactor );

// We can combine radiance ( for everything ) and irradiance ( for hair ) in denoising if material ID test is enabled
if( materialID == MATERIAL_ID_HAIR )
{
diffDemod = 1.0;
specDemod = 1.0;
diffFactor = 1.0;
specFactor = 1.0;
}

// Composition
float3 Ldiff = diff.xyz * diffDemod;
float3 Lspec = spec.xyz * specDemod;
float3 Ldiff = diff.xyz * diffFactor;
float3 Lspec = spec.xyz * specFactor;

// Apply PSR throughput ( primary surface material before replacement )
#if( USE_PSR == 1 )
Expand Down
2 changes: 1 addition & 1 deletion Shaders/Include/RaytracingShared.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ bool IsPsrAllowed( MaterialProps materialProps )

float3 GetShadowedLighting( GeometryProps geometryProps, MaterialProps materialProps, bool softShadows = true )
{
const uint instanceInclusionMask = GEOMETRY_IGNORE_TRANSPARENT; // Default shadow rays must ignore transparency // TODO: what about translucency?
const uint instanceInclusionMask = FLAG_NON_TRANSPARENT; // Default shadow rays must ignore transparency // TODO: what about translucency?
const uint rayFlags = 0;

float3 L = materialProps.Ldirect;
Expand Down
10 changes: 4 additions & 6 deletions Shaders/Include/Shared.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.
#define PT_GLASS_RAY_OFFSET 0.05 // pixels
#define PT_MAX_FIREFLY_RELATIVE_INTENSITY 20.0 // no more than 20x energy increase in case of probabilistic sampling
#define PT_EVIL_TWIN_LOBE_TOLERANCE 0.005 // normalized %
#define PT_GLASS_MIN_F 0.05 // adds a bit of stability and bias

// Spatial HAsh-ased Radiance Cache
#define SHARC_CAPACITY ( 1 << 22 )
Expand Down Expand Up @@ -161,17 +162,15 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.
#define FLAG_FIRST_BIT 25 // this + number of flags must be <= 32
#define NON_FLAG_MASK ( ( 1 << FLAG_FIRST_BIT ) - 1 )

#define FLAG_DEFAULT 0x01 // always set
#define FLAG_TRANSPARENT 0x02 // transparent
#define FLAG_NON_TRANSPARENT 0x01 // geometry flag: non-transparent
#define FLAG_TRANSPARENT 0x02 // geometry flag: transparent
#define FLAG_FORCED_EMISSION 0x04 // animated emissive cube
#define FLAG_STATIC 0x08 // no velocity
#define FLAG_DEFORMABLE 0x10 // local animation
#define FLAG_HAIR 0x20 // hair
#define FLAG_LEAF 0x40 // leaf

#define GEOMETRY_ALL 0xFF
#define GEOMETRY_ONLY_TRANSPARENT ( FLAG_TRANSPARENT )
#define GEOMETRY_IGNORE_TRANSPARENT ( ~FLAG_TRANSPARENT )
#define GEOMETRY_ALL ( FLAG_NON_TRANSPARENT | FLAG_TRANSPARENT )

//===============================================================
// STRUCTS
Expand Down Expand Up @@ -293,7 +292,6 @@ NRI_RESOURCE( cbuffer, GlobalConstants, b, 0, SET_GLOBAL )
float gExposure;
float gMipBias;
float gOrthoMode;
uint32_t gTransparent;
uint32_t gSharcMaxAccumulatedFrameNum;
uint32_t gDenoiserType;
uint32_t gDisableShadowsAndEnableImportanceSampling; // TODO: remove - modify GetSunIntensity to return 0 if sun is below horizon
Expand Down
6 changes: 3 additions & 3 deletions Shaders/SharcUpdate.cs.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void main( uint2 pixelPos : SV_DispatchThreadId )
cameraRayDirection = normalize( Rng::Hash::GetFloat4( ).xyz - 0.5 );

// Cast ray
GeometryProps geometryProps = CastRay( cameraRayOrigin, cameraRayDirection, 0.0, INF, GetConeAngleFromAngularRadius( 0.0, gTanPixelAngularRadius * SHARC_DOWNSCALE ), gWorldTlas, GEOMETRY_IGNORE_TRANSPARENT, 0 );
GeometryProps geometryProps = CastRay( cameraRayOrigin, cameraRayDirection, 0.0, INF, GetConeAngleFromAngularRadius( 0.0, gTanPixelAngularRadius * SHARC_DOWNSCALE ), gWorldTlas, FLAG_NON_TRANSPARENT, 0 );
MaterialProps materialProps = GetMaterialProps( geometryProps, USE_SHARC_V_DEPENDENT == 0 );

if( geometryProps.IsSky( ) )
Expand Down Expand Up @@ -164,7 +164,7 @@ void main( uint2 pixelPos : SV_DispatchThreadId )
// 1. If IS enabled, check the ray in LightBVH
bool isMiss = false;
if( gDisableShadowsAndEnableImportanceSampling && maxSamplesNum != 1 )
isMiss = CastVisibilityRay_AnyHit( geometryProps.GetXoffset( geometryProps.N ), r, 0.0, INF, mipAndCone, gLightTlas, GEOMETRY_ALL, 0 );
isMiss = CastVisibilityRay_AnyHit( geometryProps.GetXoffset( geometryProps.N ), r, 0.0, INF, mipAndCone, gLightTlas, FLAG_NON_TRANSPARENT, 0 );

// 2. Count rays hitting emissive surfaces
if( !isMiss )
Expand Down Expand Up @@ -242,7 +242,7 @@ void main( uint2 pixelPos : SV_DispatchThreadId )
// Trace to the next hit
//=========================================================================================================================================================

geometryProps = CastRay( geometryProps.GetXoffset( geometryProps.N ), ray, 0.0, INF, mipAndCone, gWorldTlas, GEOMETRY_IGNORE_TRANSPARENT, 0 );
geometryProps = CastRay( geometryProps.GetXoffset( geometryProps.N ), ray, 0.0, INF, mipAndCone, gWorldTlas, FLAG_NON_TRANSPARENT, 0 );
materialProps = GetMaterialProps( geometryProps, USE_SHARC_V_DEPENDENT == 0 );
}

Expand Down
50 changes: 25 additions & 25 deletions Shaders/TraceOpaque.cs.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ float2 GetBlueNoise( uint2 pixelPos, bool isCheckerboard, uint seed = 0 )
blue += ( dither.xyxy - 0.5 ) * ( 1.0 / 256.0 );

// Don't use blue noise in these cases
[flatten]
if( gDenoiserType == DENOISER_REFERENCE || gRR )
blue.xy = Rng::Hash::GetFloat2( );

Expand Down Expand Up @@ -259,8 +260,8 @@ TraceOpaqueResult TraceOpaque( inout TraceOpaqueDesc desc )
sharcState.voxelDataBuffer = gInOut_SharcVoxelDataBuffer;

bool isSharcAllowed = gSHARC && NRD_MODE < OCCLUSION; // trivial
isSharcAllowed &= geometryProps.hitT > voxelSize; // voxel angular size is acceptable
isSharcAllowed &= Rng::Hash::GetFloat( ) > Lpsr.w; // probabilistically estimate the need
isSharcAllowed &= geometryProps.hitT > voxelSize; // voxel angular size is acceptable
isSharcAllowed &= desc.bounceNum == 0; // allow only for the last bounce for PSR

float3 sharcRadiance;
Expand Down Expand Up @@ -358,7 +359,7 @@ TraceOpaqueResult TraceOpaque( inout TraceOpaqueDesc desc )
// Diffuse or specular path?
if( gTracingMode == RESOLUTION_FULL_PROBABILISTIC || bounce > 1 )
{
isDiffuse = rnd < diffuseProbability;
isDiffuse = rnd < diffuseProbability; // TODO: if "diffuseProbability" is clamped, "pathThroughput" should be adjusted too
pathThroughput /= abs( float( !isDiffuse ) - diffuseProbability );

if( bounce == 1 )
Expand Down Expand Up @@ -437,7 +438,7 @@ TraceOpaqueResult TraceOpaque( inout TraceOpaqueDesc desc )
// 1. If IS enabled, check the ray in LightBVH
bool isMiss = false;
if( gDisableShadowsAndEnableImportanceSampling && maxSamplesNum != 1 )
isMiss = CastVisibilityRay_AnyHit( geometryProps.GetXoffset( geometryProps.N ), r, 0.0, INF, mipAndCone, gLightTlas, GEOMETRY_ALL, desc.rayFlags );
isMiss = CastVisibilityRay_AnyHit( geometryProps.GetXoffset( geometryProps.N ), r, 0.0, INF, mipAndCone, gLightTlas, FLAG_NON_TRANSPARENT, desc.rayFlags );

// 2. Count rays hitting emissive surfaces
if( !isMiss )
Expand Down Expand Up @@ -609,10 +610,10 @@ TraceOpaqueResult TraceOpaque( inout TraceOpaqueDesc desc )
sharcState.hashMapData.hashEntriesBuffer = gInOut_SharcHashEntriesBuffer;
sharcState.voxelDataBuffer = gInOut_SharcVoxelDataBuffer;

float footprint = geometryProps.hitT * ImportanceSampling::GetSpecularLobeTanHalfAngle( ( isDiffuse || bounce == desc.bounceNum ) ? 1.0 : materialProps.roughness, 0.5 );
bool isSharcAllowed = gSHARC && NRD_MODE < OCCLUSION; // trivial
isSharcAllowed &= geometryProps.hitT > voxelSize; // voxel angular size is acceptable
isSharcAllowed &= Rng::Hash::GetFloat( ) > Lcached.w; // probabilistically estimate the need
isSharcAllowed &= isDiffuse || Rng::Hash::GetFloat( ) < smc || bounce == desc.bounceNum; // allowed for diffuse-like events or last bounce
isSharcAllowed &= footprint > voxelSize; // voxel angular size is acceptable

float3 sharcRadiance;
if( isSharcAllowed && SharcGetCachedRadiance( sharcState, sharcHitData, sharcRadiance, false ) )
Expand Down Expand Up @@ -698,26 +699,25 @@ TraceOpaqueResult TraceOpaque( inout TraceOpaqueDesc desc )
}
}

// Material de-modulation ( convert irradiance into radiance )
float3 albedo, Rf0;
BRDF::ConvertBaseColorMetalnessToAlbedoRf0( desc.materialProps.baseColor, desc.materialProps.metalness, albedo, Rf0 );
{ // Material de-modulation ( convert irradiance into radiance )
float3 albedo, Rf0;
BRDF::ConvertBaseColorMetalnessToAlbedoRf0( desc.materialProps.baseColor, desc.materialProps.metalness, albedo, Rf0 );

float NoV = abs( dot( desc.materialProps.N, desc.geometryProps.V ) );
float3 Fenv = BRDF::EnvironmentTerm_Rtg( Rf0, NoV, desc.materialProps.roughness );
float3 diffDemod = ( 1.0 - Fenv ) * albedo * 0.99 + 0.01;
float3 specDemod = Fenv * 0.99 + 0.01;
float3 diffFactor, specFactor;
NRD_MaterialFactors( desc.materialProps.N, desc.geometryProps.V, albedo, Rf0, desc.materialProps.roughness, diffFactor, specFactor );

// We can combine radiance ( for everything ) and irradiance ( for hair ) in denoising if material ID test is enabled
if( desc.geometryProps.Has( FLAG_HAIR ) && NRD_NORMAL_ENCODING == NRD_NORMAL_ENCODING_R10G10B10A2_UNORM )
{
diffDemod = 1.0;
specDemod = 1.0;
}
// We can combine radiance ( for everything ) and irradiance ( for hair ) in denoising if material ID test is enabled
if( desc.geometryProps.Has( FLAG_HAIR ) && NRD_NORMAL_ENCODING == NRD_NORMAL_ENCODING_R10G10B10A2_UNORM )
{
diffFactor = 1.0;
specFactor = 1.0;
}

if( gOnScreen != SHOW_MIP_SPECULAR )
{
result.diffRadiance /= diffDemod;
result.specRadiance /= specDemod;
if( gOnScreen != SHOW_MIP_SPECULAR )
{
result.diffRadiance /= diffFactor;
result.specRadiance /= specFactor;
}
}

// Radiance is already divided by sampling probability, we need to average across all paths
Expand Down Expand Up @@ -817,7 +817,7 @@ void main( uint2 pixelPos : SV_DispatchThreadId )
float3 cameraRayDirection = ( float3 )0;
GetCameraRay( cameraRayOrigin, cameraRayDirection, sampleUv );

GeometryProps geometryProps0 = CastRay( cameraRayOrigin, cameraRayDirection, 0.0, INF, GetConeAngleFromRoughness( 0.0, 0.0 ), gWorldTlas, ( gOnScreen == SHOW_INSTANCE_INDEX || gOnScreen == SHOW_NORMAL ) ? GEOMETRY_ALL : GEOMETRY_IGNORE_TRANSPARENT, 0 );
GeometryProps geometryProps0 = CastRay( cameraRayOrigin, cameraRayDirection, 0.0, INF, GetConeAngleFromRoughness( 0.0, 0.0 ), gWorldTlas, ( gOnScreen == SHOW_INSTANCE_INDEX || gOnScreen == SHOW_NORMAL ) ? GEOMETRY_ALL : FLAG_NON_TRANSPARENT, 0 );
MaterialProps materialProps0 = GetMaterialProps( geometryProps0 );

// ViewZ
Expand Down Expand Up @@ -909,8 +909,8 @@ void main( uint2 pixelPos : SV_DispatchThreadId )
desc.pixelPos = pixelPos;
desc.checkerboard = checkerboard;
desc.pathNum = gSampleNum;
desc.bounceNum = gBounceNum; // TODO: adjust by roughness?
desc.instanceInclusionMask = GEOMETRY_IGNORE_TRANSPARENT;
desc.bounceNum = gBounceNum;
desc.instanceInclusionMask = FLAG_NON_TRANSPARENT;
desc.rayFlags = 0;

TraceOpaqueResult result = TraceOpaque( desc );
Expand Down
44 changes: 27 additions & 17 deletions Shaders/TraceTransparent.cs.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ float3 TraceTransparent( TraceTransparentDesc desc )
GeometryProps geometryProps = desc.geometryProps;
float pathThroughput = 1.0;
bool isReflection = desc.isReflection;
float bayer = Sequence::Bayer4x4( desc.pixelPos, gFrameIndex );

[loop]
for( uint bounce = 1; bounce <= desc.bounceNum; bounce++ ) // TODO: stop if pathThroughput is low
Expand All @@ -66,11 +67,22 @@ float3 TraceTransparent( TraceTransparentDesc desc )
pathThroughput *= isReflection ? F : 1.0 - F;
else
{
float rndBayer = Sequence::Bayer4x4( desc.pixelPos, gFrameIndex + bounce );
float rndWhite = Rng::Hash::GetFloat( );
float rnd = ( gDenoiserType == DENOISER_REFERENCE || gRR ) ? rndWhite : rndBayer + rndWhite / 16.0;

isReflection = rnd < F;
float rnd = frac( bayer + Sequence::Halton( bounce, 3 ) ); // "Halton( bounce, 2 )" works worse than others

// Bonus dithering to break banding // TODO: needed for "transparent machines"
/*
float ditherMask = Sequence::Bayer4x4( desc.pixelPos, bounce ); // or
//float ditherMask = Rng::Hash::GetFloat( ); // or
rnd = saturate( rnd + ( ditherMask - 0.5 ) * 0.04 );
*/

[flatten]
if( gDenoiserType == DENOISER_REFERENCE || gRR )
rnd = Rng::Hash::GetFloat( );
else
F = clamp( F, PT_GLASS_MIN_F, 1.0 - PT_GLASS_MIN_F ); // TODO: needed?

isReflection = rnd < F; // TODO: if "F" is clamped, "pathThroughput" should be adjusted too
}

// Compute ray
Expand All @@ -79,25 +91,23 @@ float3 TraceTransparent( TraceTransparentDesc desc )
{
float3 I = -geometryProps.V;
float NoI = dot( geometryProps.N, I );
float k = 1.0 - eta * eta * ( 1.0 - NoI * NoI );

if( k < 0.0 )
return 0.0; // should't be here
float k = max( 1.0 - eta * eta * ( 1.0 - NoI * NoI ), 0.0 );

ray = normalize( eta * I - ( eta * NoI + sqrt( k ) ) * geometryProps.N );
eta = 1.0 / eta;
}

// Trace
float3 Xoffset = geometryProps.GetXoffset( geometryProps.N * Math::Sign( dot( ray, geometryProps.N ) ), PT_GLASS_RAY_OFFSET );
uint flags = bounce == desc.bounceNum ? GEOMETRY_IGNORE_TRANSPARENT : GEOMETRY_ALL;
uint flags = bounce == desc.bounceNum ? FLAG_NON_TRANSPARENT : GEOMETRY_ALL;

geometryProps = CastRay( Xoffset, ray, 0.0, INF, GetConeAngleFromRoughness( geometryProps.mip, 0.0 ), gWorldTlas, flags, 0 );

// TODO: glass internal extinction?
// ideally each "medium" should have "eta" and "extinction" parameters in "TraceTransparentDesc" and "TraceOpaqueDesc"
if( !isReflection )
pathThroughput *= 0.96;
// TODO: ideally each "medium" should have "eta" and "extinction" parameters in "TraceTransparentDesc" and "TraceOpaqueDesc"
bool isAir = eta < 1.0;
float extinction = isAir ? 0.0 : 1.0; // TODO: tint color? // TODO: 0.01 for "transparent machines"
if( !geometryProps.IsSky() ) // TODO: fix for non-convex geometry
pathThroughput *= exp( -extinction * geometryProps.hitT );

// Is opaque hit found?
if( !geometryProps.Has( FLAG_TRANSPARENT ) )
Expand Down Expand Up @@ -140,8 +150,8 @@ float3 TraceTransparent( TraceTransparentDesc desc )
sharcState.voxelDataBuffer = gInOut_SharcVoxelDataBuffer;

bool isSharcAllowed = gSHARC && NRD_MODE < OCCLUSION; // trivial
isSharcAllowed &= geometryProps.hitT > voxelSize; // voxel angular size is acceptable
isSharcAllowed &= Rng::Hash::GetFloat( ) > Lcached.w; // probabilistically estimate the need
isSharcAllowed &= geometryProps.hitT > voxelSize; // voxel angular size is acceptable // TODO: can be skipped to get flat ambient in some cases

float3 sharcRadiance;
if( isSharcAllowed && SharcGetCachedRadiance( sharcState, sharcHitData, sharcRadiance, false ) )
Expand Down Expand Up @@ -197,10 +207,10 @@ void main( int2 pixelPos : SV_DispatchThreadId )
float3 Xv = Geometry::ReconstructViewPosition( sampleUv, gCameraFrustum, viewZ, gOrthoMode );
float tmin0 = gOrthoMode == 0 ? length( Xv ) : abs( Xv.z );

GeometryProps geometryPropsT = CastRay( cameraRayOrigin, cameraRayDirection, 0.0, tmin0, GetConeAngleFromRoughness( 0.0, 0.0 ), gWorldTlas, gTransparent ? GEOMETRY_ONLY_TRANSPARENT : 0, 0 );
GeometryProps geometryPropsT = CastRay( cameraRayOrigin, cameraRayDirection, 0.0, tmin0, GetConeAngleFromRoughness( 0.0, 0.0 ), gWorldTlas, FLAG_TRANSPARENT, 0 );

// Trace delta events
if( !geometryPropsT.IsSky( ) && geometryPropsT.hitT < tmin0 )
if( !geometryPropsT.IsSky( ) && geometryPropsT.hitT < tmin0 && gOnScreen == SHOW_FINAL )
{
// Append "glass" mask to "hair" mask
viewZAndTaaMask = viewZAndTaaMask < 0.0 ? viewZAndTaaMask : -viewZAndTaaMask;
Expand Down
Loading

0 comments on commit b520f26

Please sign in to comment.