mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Fix no color values on bloom texture (#13197)
Align meaning of 'exposure' variable across different stages Put 'exposure' variable behind ENABLE_AUTO_EXPOSURE
This commit is contained in:
@@ -14,7 +14,9 @@ varying mediump vec2 varTexCoord;
|
||||
centroid varying vec2 varTexCoord;
|
||||
#endif
|
||||
|
||||
varying float exposure;
|
||||
#ifdef ENABLE_AUTO_EXPOSURE
|
||||
varying float exposure; // linear exposure factor, see vertex shader
|
||||
#endif
|
||||
|
||||
void main(void)
|
||||
{
|
||||
@@ -23,6 +25,11 @@ void main(void)
|
||||
// translate to linear colorspace (approximate)
|
||||
color = pow(color, vec3(2.2));
|
||||
|
||||
color *= pow(2., exposure) * exposureParams.compensationFactor * bloomStrength;
|
||||
color *= exposureParams.compensationFactor * bloomStrength;
|
||||
|
||||
#ifdef ENABLE_AUTO_EXPOSURE
|
||||
color *= exposure;
|
||||
#endif
|
||||
|
||||
gl_FragColor = vec4(color, 1.0); // force full alpha to avoid holes in the image.
|
||||
}
|
||||
|
Reference in New Issue
Block a user