File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,10 @@ float4 main(in FullScreenTriangleVSOutput VSOut) : SV_Target
4949
5050 float3 SSR = GetSpecularIBL_GGX(SrfInfo, IBLInfo, SSRRadiance.rgb);
5151
52+ float Opacity = 1.0 - OutColor.a;
5253 if (DebugMode == 0.0)
5354 {
54- OutColor.rgb += (SSR.rgb - SpecularIBL.rgb) * SSRRadiance.w * OutColor.a * SSRScale;
55+ OutColor.rgb += (SSR.rgb - SpecularIBL.rgb) * SSRRadiance.w * Opacity * SSRScale;
5556 }
5657 else if (DebugMode == 1.0)
5758 {
Original file line number Diff line number Diff line change @@ -1321,9 +1321,7 @@ void GLTFViewer::Render()
13211321 EnvMapAttribs.pEnvMap = pEnvMapSRV;
13221322 EnvMapAttribs.AverageLogLum = m_ShaderAttribs.AverageLogLum ;
13231323 EnvMapAttribs.MipLevel = m_EnvMapMipLevel;
1324- // It is essential to write zero alpha because we use alpha channel
1325- // to attenuate SSR for transparent surfaces.
1326- EnvMapAttribs.Alpha = 0.0 ;
1324+ EnvMapAttribs.Alpha = 1.0 ;
13271325 if ((m_RenderParams.Flags & GLTF_PBR_Renderer::PSO_FLAG_CONVERT_OUTPUT_TO_SRGB) != 0 )
13281326 EnvMapAttribs.Options |= EnvMapRenderer::OPTION_FLAG_CONVERT_OUTPUT_TO_SRGB;
13291327 if (m_bEnablePostProcessing)
You can’t perform that action at this time.
0 commit comments