2018-06-12 20:14:44 +00:00
|
|
|
|
2019-03-05 17:55:31 +00:00
|
|
|
layout(location=0) in vec2 TexCoord;
|
2018-06-12 21:52:33 +00:00
|
|
|
layout(location=0) out vec4 FragColor;
|
2018-06-12 20:14:44 +00:00
|
|
|
|
2018-06-13 13:53:56 +00:00
|
|
|
layout(binding=0) uniform sampler2D SourceTexture;
|
2018-06-12 20:14:44 +00:00
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
#if defined(BLUR_HORIZONTAL)
|
|
|
|
FragColor =
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2( 0, 0)) * SampleWeights0 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2( 1, 0)) * SampleWeights1 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2(-1, 0)) * SampleWeights2 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2( 2, 0)) * SampleWeights3 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2(-2, 0)) * SampleWeights4 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2( 3, 0)) * SampleWeights5 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2(-3, 0)) * SampleWeights6;
|
|
|
|
#else
|
|
|
|
FragColor =
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2(0, 0)) * SampleWeights0 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2(0, 1)) * SampleWeights1 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2(0,-1)) * SampleWeights2 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2(0, 2)) * SampleWeights3 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2(0,-2)) * SampleWeights4 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2(0, 3)) * SampleWeights5 +
|
|
|
|
textureOffset(SourceTexture, TexCoord, ivec2(0,-3)) * SampleWeights6;
|
|
|
|
#endif
|
|
|
|
}
|