diff options
author | Hamed Zaghaghi <hamed.zaghaghi@gmail.com> | 2007-11-06 15:16:12 +0300 |
---|---|---|
committer | Hamed Zaghaghi <hamed.zaghaghi@gmail.com> | 2007-11-06 15:16:12 +0300 |
commit | af169b41fda5fe05d62655b782674eda2bc565e7 (patch) | |
tree | f70303d83032dffdeca399e97659cfa91fcc5d0a /source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Blur2DFilter.h | |
parent | aa774427f64916ef5713c01c5d23657b61a80003 (diff) |
2d Filters updated, now you can use custom filter and write your own GLSL shader program to filter rendering result.
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Blur2DFilter.h')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Blur2DFilter.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Blur2DFilter.h b/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Blur2DFilter.h index ae7f56174e6..2b0bdbc4351 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Blur2DFilter.h +++ b/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Blur2DFilter.h @@ -2,8 +2,8 @@ #define __RAS_BLUR2DFILTER char * BlurFragmentShader=STRINGIFY( -uniform sampler2D sampler0; -uniform vec2 tc_offset[9]; +uniform sampler2D bgl_RenderedTexture; +uniform vec2 bgl_TextureCoordinateOffset[9]; void main(void) { @@ -11,8 +11,8 @@ void main(void) for (int i = 0; i < 9; i++) { - sample[i] = texture2D(sampler0, - gl_TexCoord[0].st + tc_offset[i]); + sample[i] = texture2D(bgl_RenderedTexture, + gl_TexCoord[0].st + bgl_TextureCoordinateOffset[i]); } gl_FragColor = (sample[0] + (2.0*sample[1]) + sample[2] + |