2017-09-30 18:30:26 +02:00
|
|
|
#version 450 core
|
|
|
|
|
|
|
|
layout( location = 0 ) uniform sampler2D u_Input;
|
|
|
|
layout( location = 1 ) uniform int u_LOD;
|
|
|
|
layout( location = 2 ) uniform vec2 u_InputSize;
|
|
|
|
layout( location = 3 ) uniform vec3 u_FilterParams;
|
|
|
|
|
|
|
|
layout( location = 0 ) out vec3 color;
|
|
|
|
|
|
|
|
|
|
|
|
void main( void )
|
|
|
|
{
|
|
|
|
vec3 c = textureLod( u_Input , gl_FragCoord.xy / u_InputSize.xy , u_LOD ).xyz;
|
2017-09-30 19:41:45 +02:00
|
|
|
color = max( vec3(0) , ( pow( c , vec3( u_FilterParams.x ) ) * u_FilterParams.y - c ) / u_FilterParams.z );
|
2017-09-30 18:30:26 +02:00
|
|
|
}
|