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

@ -31,16 +31,16 @@ uniform vec2 oneOverTargetSize;
const float offset[3] = float[]( 0.0, 1.3846153846, 3.2307692308 );
const float weight[3] = float[]( 0.2270270270, 0.3162162162, 0.0702702703 );
out vec4 OUT_col;
void main()
{
vec4 OUT = texture( diffuseMap, uv ) * weight[0];
OUT_col = texture( diffuseMap, uv ) * weight[0];
for ( int i=1; i < 3; i++ )
{
vec2 _sample = (BLUR_DIR * offset[i]) * oneOverTargetSize;
OUT += texture( diffuseMap, uv + _sample ) * weight[i];
OUT += texture( diffuseMap, uv - _sample ) * weight[i];
OUT_col += texture( diffuseMap, uv + _sample ) * weight[i];
OUT_col += texture( diffuseMap, uv - _sample ) * weight[i];
}
OUT_FragColor0 = OUT;
}