mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00: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:
parent
d3a6ee00e6
commit
4cd6b773bb
4 changed files with 29 additions and 9 deletions
|
@ -1,18 +1,25 @@
|
|||
#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
|
||||
|
||||
varying float exposure;
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue