source:
trunk/src/opengl/util/fast_painter.glsl@
348
Last change on this file since 348 was 2, checked in by , 16 years ago | |
---|---|
File size: 447 bytes |
Line | |
---|---|
1 | // fast painter for composition modes which can be implemented with blendfuncs |
2 | |
3 | uniform sampler2D mask_texture; |
4 | uniform vec2 inv_mask_size; |
5 | uniform vec2 mask_offset; |
6 | uniform vec4 mask_channel; |
7 | |
8 | float mask() |
9 | { |
10 | return dot(mask_channel, texture2D(mask_texture, (gl_FragCoord.xy + mask_offset) * inv_mask_size)); |