Advertisement
codeanticode

shader created in Java 7

May 24th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. #define lowp
  2. #define mediump
  3. #define highp
  4. #define MOTION_BLUR_SAMPLES 8
  5.  
  6. uniform highp mat4 vertex_matrix;
  7. uniform highp mat4 vertex_velocity_matrix;
  8. uniform highp vec4 texmat0, texmat1, texmat2;
  9. uniform highp vec4 texmatD;
  10. attribute highp vec4 vertex_position;
  11. attribute lowp vec4 vertex_color0, vertex_color1;
  12. attribute highp vec2 vertex_texcoord0, vertex_texcoord1, vertex_texcoord2;
  13. attribute mediump vec3 vertex_normal;
  14. varying mediump vec2 velocity;
  15. varying lowp vec4 color0;
  16. varying lowp vec4 color1;
  17. varying lowp vec3 normal;
  18. varying highp vec2 texcoord0_0;
  19. varying highp vec2 texcoord1_0;
  20. varying highp vec2 texcoord2_0;
  21. varying highp vec3 texcoordD;
  22.  
  23. void main() {
  24. gl_Position = vertex_matrix * vertex_position;
  25. highp vec4 vp1 = vertex_position;
  26. highp vec4 vp0 = vertex_velocity_matrix * vertex_position;
  27. velocity = (vp1.xy / vp1.w) - (vp0.xy / vp0.w);
  28. color0 = vertex_color0;
  29. color1 = vertex_color1;
  30. texcoord0_0 = vertex_texcoord0 * texmat0.xy + texmat0.zw;
  31. texcoord1_0 = vertex_texcoord1 * texmat1.xy + texmat1.zw;
  32. texcoord2_0 = vertex_texcoord2 * texmat2.xy + texmat2.zw;
  33. texcoordD = vec3(gl_Position.xy * texmatD.xy + texmatD.zw * gl_Position.w, gl_Position.w);
  34. normal = vertex_normal;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement