mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-30 23:56:38 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
	
		
			402 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
	
		
			402 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #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;
 | |
| }
 |