minetest/client/shaders/extract_bloom/opengl_vertex.glsl
x2048 6d45c243f8
Add dynamic exposure correction (#12959)
* Add uniform for frame delta time
* Adjust exposure in logarithmic (EV) space
* Add network support and LUA API
* Add testing mod
2023-01-06 22:33:25 +01:00

20 lines
320 B
GLSL

#define exposureMap texture1
uniform sampler2D exposureMap;
#ifdef GL_ES
varying mediump vec2 varTexCoord;
#else
centroid varying vec2 varTexCoord;
#endif
varying float exposure;
void main(void)
{
exposure = texture2D(exposureMap, vec2(0.5)).r;
varTexCoord.st = inTexCoord0.st;
gl_Position = inVertexPosition;
}