mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-22 10:53:54 +00:00
15 lines
402 B
Text
15 lines
402 B
Text
|
#version 120
|
||
|
|
||
|
varying vec2 uv;
|
||
|
uniform sampler2D luminanceSceneTex;
|
||
|
uniform sampler2D prevLuminanceSceneTex;
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
float prevLum = texture2D(prevLuminanceSceneTex, vec2(0.5, 0.5)).r;
|
||
|
|
||
|
float l = texture2D(luminanceSceneTex, vec2(0.5, 0.5)).r;
|
||
|
float weightedAvgLum = exp2((l * @logLumRange) + @minLog);
|
||
|
gl_FragColor.r = prevLum + (weightedAvgLum - prevLum) * @hdrExposureTime;
|
||
|
}
|