Clean GLSL fragment shader out.

This commit is contained in:
LuisAntonRebollo 2014-11-30 22:56:30 +01:00
parent 87f34e3c4f
commit ed0febea39
135 changed files with 451 additions and 239 deletions

View file

@ -46,6 +46,7 @@ uniform sampler2D prepassMap ;
uniform float blurDepthTol;
uniform float blurNormalTol;
out vec4 OUT_col;
void _sample( vec2 uv, float weight, vec4 centerTap, inout int usedCount, inout float occlusion, inout float total )
{
@ -96,7 +97,7 @@ void main()
//occlusion /= (float)usedCount / 8.0;
occlusion /= total;
OUT_FragColor0 = vec4( vec3(occlusion), 1 );
OUT_col = vec4( vec3(occlusion), 1 );
//return vec4( 0,0,0,occlusion );

View file

@ -57,6 +57,8 @@ uniform float lDepthPow;
uniform float lNormalTol;
uniform float lNormalPow;
out vec4 OUT_col;
#ifndef QUALITY
#define QUALITY 2
@ -152,7 +154,7 @@ void main()
// Early out if too far away.
if ( depth > 0.99999999 )
{
OUT_FragColor0 = vec4( 0,0,0,0 );
OUT_col = vec4( 0,0,0,0 );
return;
}
@ -270,7 +272,7 @@ void main()
// seems backwards, but it makes it simple to deal with the SSAO
// being disabled in the lighting shaders.
OUT_FragColor0 = vec4(occlusion, vec3(0.0));
OUT_col = vec4(occlusion, vec3(0.0));
}

View file

@ -25,8 +25,10 @@
in vec2 uv0;
#define IN_uv0 uv0
out vec4 OUT_col;
void main()
{
float power = pow( max( IN_uv0.x, 0 ), 0.1 );
OUT_FragColor0 = vec4( power, 0, 0, 1 );
OUT_col = vec4( power, 0, 0, 1 );
}