Skip to content

Commit 7d9d5e0

Browse files
committed
Polishing
1 parent 6540204 commit 7d9d5e0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Shaders/Composition.cs.hlsl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ void main( int2 pixelPos : SV_DispatchThreadId )
7373
BRDF::ConvertBaseColorMetalnessToAlbedoRf0( baseColorMetalness.xyz, baseColorMetalness.w, albedo, Rf0 );
7474

7575
float3 Xv = Geometry::ReconstructViewPosition( sampleUv, gCameraFrustum, viewZ, gOrthoMode );
76-
float3 X = Geometry::AffineTransform( gViewToWorld, Xv );
7776
float3 V = gOrthoMode == 0 ? normalize( Geometry::RotateVector( gViewToWorld, 0 - Xv ) ) : gViewDirection.xyz;
7877

7978
// Sample NRD outputs
@@ -232,7 +231,10 @@ void main( int2 pixelPos : SV_DispatchThreadId )
232231
else if( gOnScreen == SHOW_PSR_THROUGHPUT )
233232
Ldiff = psrThroughput;
234233
else if( gOnScreen == SHOW_WORLD_UNITS )
234+
{
235+
float3 X = Geometry::AffineTransform( gViewToWorld, Xv );
235236
Ldiff = frac( X * gUnitToMetersMultiplier );
237+
}
236238
else if( gOnScreen != SHOW_FINAL )
237239
Ldiff = gOnScreen == SHOW_MIP_SPECULAR ? spec.xyz : Ldirect.xyz;
238240

0 commit comments

Comments
 (0)