DYTSrouce/Source/resources/shaders/osgOcean_gaussian1.frag

20 lines
554 B
GLSL
Raw Normal View History

2024-11-22 15:11:48 +00:00
#extension GL_ARB_texture_rectangle : enable
uniform sampler2DRect osgOcean_GaussianTexture;
void main( void )
{
vec2 texCoordSample = vec2( 0.0 );
vec4 color = 0.5 * texture2DRect( osgOcean_GaussianTexture, gl_TexCoord[0].st );
texCoordSample.x = gl_TexCoord[0].x;
texCoordSample.y = gl_TexCoord[0].y + 1.0;
color += 0.25 * texture2DRect( osgOcean_GaussianTexture, texCoordSample);
texCoordSample.y = gl_TexCoord[0].y - 1.0;
color += 0.25 * texture2DRect( osgOcean_GaussianTexture, texCoordSample);
gl_FragColor = color;
}