Fix sky, skylight and reflections banding artifacts with a random noise

#3254 #3318
This commit is contained in:
Wojtek Figat
2026-01-13 13:12:19 +01:00
parent b4b13d8dd4
commit 14842183f2
7 changed files with 26 additions and 9 deletions

View File

@@ -24,7 +24,7 @@ GPU_CB_STRUCT(Data {
Matrix WorldViewProjection;
Matrix InvViewProjection;
Float3 ViewOffset;
float Padding;
float NoiseScale;
ShaderGBufferData GBuffer;
ShaderAtmosphericFogData Fog;
});
@@ -184,6 +184,7 @@ void Sky::ApplySky(GPUContext* context, RenderContext& renderContext, const Matr
Matrix::Transpose(renderContext.View.IVP, data.InvViewProjection);
GBufferPass::SetInputs(renderContext.View, data.GBuffer);
data.ViewOffset = renderContext.View.Origin + GetPosition();
data.NoiseScale = renderContext.View.IsSingleFrame ? 0.01f : 0.03f;
InitConfig(data.Fog);
//data.Fog.AtmosphericFogSunPower *= SunLight ? SunLight->Brightness : 1.0f;
if (EnumHasNoneFlags(renderContext.View.Flags, ViewFlags::SpecularLight))