mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00: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:
parent
f54d209bc8
commit
2db4ad8c77
3 changed files with 13 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue