Sfoglia il codice sorgente

Bugfix: Directional light no longer incorrectly samples the GBuffer, causing the rendering to appear significantly lower resolution

BearishSun 8 anni fa
parent
commit
7973d92b3d

BIN
Data/Engine/Shaders/DeferredDirectionalLight.bsl.asset


+ 1 - 1
Data/Raw/Engine/Shaders/DeferredDirectionalLight.bsl

@@ -68,7 +68,7 @@ technique DeferredDirectionalLight
 			#endif
 			) : SV_Target0
 		{
-			uint2 pixelPos = (uint2)(input.uv0 * (float2)gViewportRectangle.zw - ((float2)gViewportRectangle.xy + 0.5f));
+			uint2 pixelPos = UVToScreen(input.uv0);
 			
 			#if MSAA_COUNT > 1
 				#if MSAA_RESOLVE_0TH