2023-02-10 21:04:37 +01:00
|
|
|
#ifdef ENABLE_AUTO_EXPOSURE
|
2023-01-06 22:33:25 +01:00
|
|
|
#define exposureMap texture1
|
|
|
|
|
|
|
|
uniform sampler2D exposureMap;
|
|
|
|
|
2023-02-10 21:04:37 +01:00
|
|
|
varying float exposure;
|
|
|
|
#endif
|
|
|
|
|
2022-09-29 20:34:05 +02:00
|
|
|
#ifdef GL_ES
|
|
|
|
varying mediump vec2 varTexCoord;
|
|
|
|
#else
|
|
|
|
centroid varying vec2 varTexCoord;
|
|
|
|
#endif
|
|
|
|
|
2023-01-06 22:33:25 +01:00
|
|
|
|
2022-09-29 20:34:05 +02:00
|
|
|
void main(void)
|
|
|
|
{
|
2023-02-10 21:04:37 +01:00
|
|
|
#ifdef ENABLE_AUTO_EXPOSURE
|
|
|
|
// value in the texture is on a logarithtmic scale
|
2023-01-06 22:33:25 +01:00
|
|
|
exposure = texture2D(exposureMap, vec2(0.5)).r;
|
2023-02-10 21:04:37 +01:00
|
|
|
exposure = pow(2., exposure);
|
|
|
|
#endif
|
2023-01-06 22:33:25 +01:00
|
|
|
|
2022-09-29 20:34:05 +02:00
|
|
|
varTexCoord.st = inTexCoord0.st;
|
|
|
|
gl_Position = inVertexPosition;
|
|
|
|
}
|