From 3aecab07971c17e18e71e3be904a59bf7945219d Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Tue, 12 Feb 2019 18:10:31 -0800 Subject: Reworked SRB management in epipolar light scattering pp effect --- .../EpipolarLightScattering/private/RenderCoordinateTexture.fx | 9 +++------ .../EpipolarLightScattering/private/RenderSampling.fx | 2 +- .../private/precompute/PrecomputeNetDensityToAtmTop.fx | 2 -- .../private/precompute/PrecomputeSingleScattering.fx | 2 -- 4 files changed, 4 insertions(+), 11 deletions(-) (limited to 'Shaders/PostProcess') diff --git a/Shaders/PostProcess/EpipolarLightScattering/private/RenderCoordinateTexture.fx b/Shaders/PostProcess/EpipolarLightScattering/private/RenderCoordinateTexture.fx index 183eaa5..351f3f6 100644 --- a/Shaders/PostProcess/EpipolarLightScattering/private/RenderCoordinateTexture.fx +++ b/Shaders/PostProcess/EpipolarLightScattering/private/RenderCoordinateTexture.fx @@ -1,6 +1,3 @@ -// RenderCoordinateTexture.fx -// Renders coordinate texture - #include "AtmosphereShadersCommon.fxh" Texture2D g_tex2DCamSpaceZ; @@ -13,7 +10,7 @@ void GenerateCoordinateTexturePS(FullScreenTriangleVSOutput VSOut, // arguments must have the exact same name as vertex shader // outputs and must go in the same order. - out float2 f2XY : SV_Target0, + out float2 f2XY : SV_Target0, out float fCamSpaceZ : SV_Target1) { @@ -22,7 +19,7 @@ void GenerateCoordinateTexturePS(FullScreenTriangleVSOutput VSOut, // If slice entry point is outside [-1,1]x[-1,1] area, the slice is completely invisible // and we can skip it from further processing. // Note that slice exit point can lie outside the screen, if sample locations are optimized - if( !IsValidScreenLocation(f4SliceEndPoints.xy) ) + if (!IsValidScreenLocation(f4SliceEndPoints.xy)) { // Discard invalid slices // Such slices will not be marked in the stencil and as a result will always be skipped @@ -47,7 +44,7 @@ void GenerateCoordinateTexturePS(FullScreenTriangleVSOutput VSOut, // Compute interpolated position between entry and exit points: f2XY = lerp(f4SliceEndPoints.xy, f4SliceEndPoints.zw, fSamplePosOnEpipolarLine); - if( !IsValidScreenLocation(f2XY) ) + if (!IsValidScreenLocation(f2XY)) { // Discard pixels that fall behind the screen // This can happen if slice exit point was optimized diff --git a/Shaders/PostProcess/EpipolarLightScattering/private/RenderSampling.fx b/Shaders/PostProcess/EpipolarLightScattering/private/RenderSampling.fx index 12494f0..dc7d0e0 100644 --- a/Shaders/PostProcess/EpipolarLightScattering/private/RenderSampling.fx +++ b/Shaders/PostProcess/EpipolarLightScattering/private/RenderSampling.fx @@ -11,7 +11,7 @@ struct VSOutput }; void RenderSampleLocationsVS(in uint VertexID : SV_VertexID, - in uint InstID : SV_InstanceID, + in uint InstID : SV_InstanceID, out VSOutput VSOut, // IMPORTANT: non-system generated pixel shader input // arguments must have the exact same name as vertex shader diff --git a/Shaders/PostProcess/EpipolarLightScattering/private/precompute/PrecomputeNetDensityToAtmTop.fx b/Shaders/PostProcess/EpipolarLightScattering/private/precompute/PrecomputeNetDensityToAtmTop.fx index 460194f..56685a6 100644 --- a/Shaders/PostProcess/EpipolarLightScattering/private/precompute/PrecomputeNetDensityToAtmTop.fx +++ b/Shaders/PostProcess/EpipolarLightScattering/private/precompute/PrecomputeNetDensityToAtmTop.fx @@ -1,5 +1,3 @@ -// Precomputes optical depth - #include "AtmosphereShadersCommon.fxh" diff --git a/Shaders/PostProcess/EpipolarLightScattering/private/precompute/PrecomputeSingleScattering.fx b/Shaders/PostProcess/EpipolarLightScattering/private/precompute/PrecomputeSingleScattering.fx index e65ea52..e377de1 100644 --- a/Shaders/PostProcess/EpipolarLightScattering/private/precompute/PrecomputeSingleScattering.fx +++ b/Shaders/PostProcess/EpipolarLightScattering/private/precompute/PrecomputeSingleScattering.fx @@ -1,5 +1,3 @@ -// Precomputes single scattering - #include "AtmosphereShadersCommon.fxh" #ifndef THREAD_GROUP_SIZE -- cgit v1.2.3