Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // glsl fragment shader
- static const char *cubic_fragmentshaderGL2D = "\
- uniform sampler2D texUnit0; \
- uniform sampler2D texUnit1; \
- uniform sampler2D texUnit2; \
- uniform sampler2D texUnit3; \
- uniform vec4 weights;\
- uniform float newalpha;\
- void main(void)\
- {\
- vec4 c0 = texture2D( texUnit0, gl_TexCoord[0].st );\
- vec4 c1 = texture2D( texUnit1, gl_TexCoord[0].st );\
- vec4 c2 = texture2D( texUnit2, gl_TexCoord[0].st );\
- vec4 c3 = texture2D( texUnit3, gl_TexCoord[0].st );\
- gl_FragColor = ( c0 * weights.x ) + ( c1 * weights.y ) + ( c2 * weights.z ) + ( c3 * weights.w ); \
- gl_FragColor.a = newalpha;\
- }";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement