mirror of
https://github.com/minetest/minetest.git
synced 2024-11-12 18:53:46 +01:00
4cd6b773bb
Align meaning of 'exposure' variable across different stages Put 'exposure' variable behind ENABLE_AUTO_EXPOSURE
27 lines
474 B
GLSL
27 lines
474 B
GLSL
#ifdef ENABLE_AUTO_EXPOSURE
|
|
#define exposureMap texture1
|
|
|
|
uniform sampler2D exposureMap;
|
|
|
|
varying float exposure;
|
|
#endif
|
|
|
|
#ifdef GL_ES
|
|
varying mediump vec2 varTexCoord;
|
|
#else
|
|
centroid varying vec2 varTexCoord;
|
|
#endif
|
|
|
|
|
|
void main(void)
|
|
{
|
|
#ifdef ENABLE_AUTO_EXPOSURE
|
|
// value in the texture is on a logarithtmic scale
|
|
exposure = texture2D(exposureMap, vec2(0.5)).r;
|
|
exposure = pow(2., exposure);
|
|
#endif
|
|
|
|
varTexCoord.st = inTexCoord0.st;
|
|
gl_Position = inVertexPosition;
|
|
}
|