- fix wrong fog color used for ssao when using multisampling

This commit is contained in:
Magnus Norddahl 2019-05-05 23:23:47 +02:00
parent e21ffc131e
commit e75ab8ed09

View file

@ -22,10 +22,7 @@ void main()
ivec2 ipos = ivec2(uv * vec2(texSize));
#if defined(MULTISAMPLE)
vec3 fogColor = vec3(0.0);
for (int i = 0; i < SampleCount; i++)
fogColor += texelFetch(SceneFogTexture, ipos, i).rgb;
fogColor /= float(SampleCount);
vec3 fogColor = texelFetch(SceneFogTexture, ipos, 0).rgb;
#else
vec3 fogColor = texelFetch(SceneFogTexture, ipos, 0).rgb;
#endif