aboutsummaryrefslogtreecommitdiff
path: root/client/shaders/extract_bloom/opengl_vertex.glsl
blob: 2fee884ba4338f07e2d3c80b6be6f0f9d43f1691 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#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;
}