Guest User

Untitled

a guest
Jun 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. uniform mat4 u_Matrix;
  2. attribute vec4 v_Position;
  3. attribute vec4 v_Position1;
  4. attribute vec2 a_texCoord;
  5. attribute vec2 a_texCoord1;
  6. varying vec2 v_texCoord;
  7. varying vec2 v_texCoord1;
  8.  
  9. void main() {
  10. gl_Position = u_Matrix * v_Position * v_Position1; /*I guess that
  11. this is not possible.*/
  12. v_texCoord = a_texCoord;
  13. v_texCoord1 = a_texCoord1;
  14. }
  15.  
  16. precision mediump float;
  17. varying vec2 v_texCoord;
  18. varying vec2 v_texCoord2;
  19. uniform sampler2D u_texture;
  20. uniform sampler2D u_texture2;
  21. vec4 col1;
  22. vec4 col2;
  23.  
  24. void main() {
  25. col1 = texture2D(u_texture, v_texCoord);
  26. col2 = texture2D(u_texture2, v_texCoord2);
  27. gl_FragColor = col1 + col2;
  28. }
  29.  
  30. gl_Position = u_Matrix * (v_Position + v_Position1);
  31.  
  32. attribute vec3 v_Position;
  33. attribute vec3 v_Position1;
  34.  
  35. void main()
  36. {
  37. gl_Position = u_Matrix * vec4(v_Position.xyz + v_Position1.xyz, 1.0);
  38.  
  39. .....
  40. }
Add Comment
Please, Sign In to add comment