1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Fix MSAA and bloom flashing artifacts (#15610)

* Mark varColor and nightratio as centroids
* Leave old workaround in place for GLES
This commit is contained in:
lhofhansl
2025-01-01 14:18:05 -08:00
committed by GitHub
parent f54d209bc8
commit 2db4ad8c77
3 changed files with 13 additions and 4 deletions

View File

@@ -23,7 +23,12 @@ void main(void)
vec2 uv = varTexCoord.st;
vec3 color = texture2D(rendered, uv).rgb;
// translate to linear colorspace (approximate)
#ifdef GL_ES
// clamp color to [0,1] range in lieu of centroids
color = pow(clamp(color, 0.0, 1.0), vec3(2.2));
#else
color = pow(color, vec3(2.2));
#endif
color *= exposureParams.compensationFactor * bloomStrength;