From 9b3ff05af7560f963cf05b06d884d2bfea055f9f Mon Sep 17 00:00:00 2001 From: ExMatics HydrogenC <33123710+HydrogenC@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:47:11 +0800 Subject: [PATCH] Remove debug code --- Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl | 2 +- Source/Shaders/SSR.shader | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl b/Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl index c157ff6c2..914173c03 100644 --- a/Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl +++ b/Content/Editor/MaterialTemplates/Features/ForwardShading.hlsl @@ -139,7 +139,7 @@ void PS_Forward( if(TraceSDFSoftwareReflections(gBuffer, reflectWS, surfaceAtlas)){ float3 screenColor = sceneColorTexture.SampleLevel(SamplerPointClamp, hit.xy, 0).rgb; - reflections = lerp(2 * surfaceAtlas, float4(screenColor, 1), hit.z); + reflections = lerp(surfaceAtlas, float4(screenColor, 1), hit.z); } } diff --git a/Source/Shaders/SSR.shader b/Source/Shaders/SSR.shader index de9cb891c..4e3a46e51 100644 --- a/Source/Shaders/SSR.shader +++ b/Source/Shaders/SSR.shader @@ -151,7 +151,7 @@ float4 PS_RayTracePass(Quad_VS2PS input) : SV_Target0 float4 surfaceAtlas = SampleGlobalSurfaceAtlas(GlobalSurfaceAtlas, GlobalSurfaceAtlasChunks, RWGlobalSurfaceAtlasCulledObjects, GlobalSurfaceAtlasObjects, GlobalSurfaceAtlasDepth, GlobalSurfaceAtlasTex, hitPosition, -reflectWS, surfaceThreshold); // Now the sdf reflection part is significantly darker than the screen space part // TODO: Maybe multiply surfaceAtlas by a constant to make it brighter, adding 2* looks fine - result = lerp(2 * surfaceAtlas, float4(result.rgb, 1), result.a); + result = lerp(surfaceAtlas, float4(result.rgb, 1), result.a); } #endif