Skip to content

Commit 6566c00

Browse files
committed
PT: fixed shadow ray offsetting (regression)
1 parent f9eab12 commit 6566c00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Shaders/Include/RaytracingShared.hlsli

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,9 @@ float3 GetLighting( GeometryProps geometryProps, MaterialProps materialProps, ui
648648

649649
float3 sunDirection = normalize( gSunBasisX.xyz * rnd.x + gSunBasisY.xyz * rnd.y + gSunDirection.xyz );
650650
float2 mipAndCone = GetConeAngleFromAngularRadius( geometryProps.mip, gTanSunAngularRadius );
651+
float3 Xoffset = geometryProps.GetXoffset( sunDirection, PT_SHADOW_RAY_OFFSET );
651652

652-
float hitT = CastVisibilityRay_AnyHit( Xshadow, sunDirection, 0.0, INF, mipAndCone, gWorldTlas, instanceInclusionMask, rayFlags );
653+
float hitT = CastVisibilityRay_AnyHit( Xoffset, sunDirection, 0.0, INF, mipAndCone, gWorldTlas, instanceInclusionMask, rayFlags );
653654
lighting *= float( hitT == INF );
654655
}
655656
#endif

0 commit comments

Comments
 (0)