Commit 8d21266b authored by Hatem ElKharashy's avatar Hatem ElKharashy Committed by Qt Cherry-pick Bot
Browse files

Fix Reflection Probe artifacts



In dark environment, the diffuse irradiance values of
the reflection cube map cause ugly artifacts due to
not enough samples taken. This fix sacrifice some
performance to reduce the artifacts by increasing the
samples count depending on the cube map resolution.

Change-Id: I3a2baa91df11c3aa66f1997c6f6033acf7516138
Reviewed-by: default avatarAndy Nichols <andy.nichols@qt.io>
(cherry picked from commit 2e0ddd57

)
Reviewed-by: default avatarQt Cherry-pick Bot <cherrypick_bot@qt-project.org>
parent 308ebb34
......@@ -511,7 +511,7 @@ void QSSGReflectionMapEntry::renderMips(QSSGRhiContext *context)
const float roughness = 0.0f; // doesn't matter for irradiance
const float lodBias = 0.0f;
const int distribution = 0;
const int sampleCount = prefilterSampleCount;
const int sampleCount = resolution / 4;
rub->updateDynamicBuffer(m_irradianceFragBuffer, 0, 4, &roughness);
rub->updateDynamicBuffer(m_irradianceFragBuffer, 4, 4, &resolution);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment