summaryrefslogtreecommitdiffstats
path: root/PostProcess/EpipolarLightScattering/src/EpipolarLightScattering.cpp
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-05-16 22:04:57 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-05-16 22:04:57 +0000
commit054c00b8da74d68378c8e8e29cf37cce6df9c1a9 (patch)
tree8a0db45452bf573d3bd5aafbbe80908364884509 /PostProcess/EpipolarLightScattering/src/EpipolarLightScattering.cpp
parentMinor update in cmake file (diff)
downloadDiligentFX-054c00b8da74d68378c8e8e29cf37cce6df9c1a9.tar.gz
DiligentFX-054c00b8da74d68378c8e8e29cf37cce6df9c1a9.zip
Scattering FX: enabled control of the number of ray marching samples at depth breaks
Diffstat (limited to 'PostProcess/EpipolarLightScattering/src/EpipolarLightScattering.cpp')
-rw-r--r--PostProcess/EpipolarLightScattering/src/EpipolarLightScattering.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/PostProcess/EpipolarLightScattering/src/EpipolarLightScattering.cpp b/PostProcess/EpipolarLightScattering/src/EpipolarLightScattering.cpp
index 2e48000..4644fc2 100644
--- a/PostProcess/EpipolarLightScattering/src/EpipolarLightScattering.cpp
+++ b/PostProcess/EpipolarLightScattering/src/EpipolarLightScattering.cpp
@@ -2083,6 +2083,7 @@ void EpipolarLightScattering::PrepareForNewFrame(FrameAttribs&
DEV_CHECK_ERR(PPAttribs.uiInstrIntegralSteps > 0, "Inscattering integral steps must not be 0");
DEV_CHECK_ERR(PPAttribs.f2ShadowMapTexelSize.x != 0 && PPAttribs.f2ShadowMapTexelSize.y != 0, "Shadow map texel size must not be 0");
DEV_CHECK_ERR(PPAttribs.uiMaxSamplesOnTheRay != 0, "Max samples on the ray must not be 0");
+ DEV_CHECK_ERR(!PPAttribs.bCorrectScatteringAtDepthBreaks || PPAttribs.uiMaxSamplesOnTheRayAtDepthBreak != 0, "Max samples on the ray at depth correction pass must not be 0");
DEV_CHECK_ERR(PPAttribs.uiMinMaxShadowMapResolution != 0, "Minmax shadow map resolution must not be 0");
DEV_CHECK_ERR(PPAttribs.iNumCascades != 0, "Num cascades must not be 0");
DEV_CHECK_ERR(PPAttribs.iFirstCascadeToRayMarch < PPAttribs.iNumCascades, "First cascade to ray march (", PPAttribs.fFirstCascadeToRayMarch, ") is invalid");
@@ -2412,9 +2413,6 @@ void EpipolarLightScattering::PerformPostProcessing()
// Interpolate ray marching samples onto the rest of samples
InterpolateInsctrIrradiance();
- const Uint32 uiMaxStepsAlongRayAtDepthBreak0 = std::min(m_PostProcessingAttribs.uiMaxSamplesOnTheRay / 4, 256u);
- //const Uint32 uiMaxStepsAlongRayAtDepthBreak1 = std::min(m_PostProcessingAttribs.uiMaxSamplesOnTheRay/8, 128u);
-
if (m_PostProcessingAttribs.ToneMapping.bAutoExposure)
{
// Render scene luminance to low-resolution texture
@@ -2438,7 +2436,7 @@ void EpipolarLightScattering::PerformPostProcessing()
// Correct inscattering for pixels, for which no suitable interpolation sources were found
if (m_PostProcessingAttribs.bCorrectScatteringAtDepthBreaks)
{
- FixInscatteringAtDepthBreaks(uiMaxStepsAlongRayAtDepthBreak0, EFixInscatteringMode::FixInscattering);
+ FixInscatteringAtDepthBreaks(m_PostProcessingAttribs.uiMaxSamplesOnTheRayAtDepthBreak, EFixInscatteringMode::FixInscattering);
}
if (m_PostProcessingAttribs.bShowSampling)