Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. // glsl fragment shader
  2. static const char *cubic_fragmentshaderGL2D = "\
  3. uniform sampler2D texUnit0; \
  4. uniform sampler2D texUnit1; \
  5. uniform sampler2D texUnit2; \
  6. uniform sampler2D texUnit3; \
  7. uniform vec4 weights;\
  8. uniform float newalpha;\
  9. void main(void)\
  10. {\
  11. vec4 c0 = texture2D( texUnit0, gl_TexCoord[0].st );\
  12. vec4 c1 = texture2D( texUnit1, gl_TexCoord[0].st );\
  13. vec4 c2 = texture2D( texUnit2, gl_TexCoord[0].st );\
  14. vec4 c3 = texture2D( texUnit3, gl_TexCoord[0].st );\
  15. gl_FragColor = ( c0 * weights.x ) + ( c1 * weights.y ) + ( c2 * weights.z ) + ( c3 * weights.w ); \
  16. gl_FragColor.a = newalpha;\
  17. }";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement