mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Clean GLSL fragment shader out.
This commit is contained in:
parent
87f34e3c4f
commit
ed0febea39
135 changed files with 451 additions and 239 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue