Advertisement
Guest User

Untitled

a guest
May 29th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. #version 120
  2.  
  3. varying vec4 color;
  4. varying vec4 texcoord;
  5. varying vec4 lmcoord;
  6.  
  7. attribute vec4 mc_Entity;
  8.  
  9. uniform float frameTimeCounter;
  10.  
  11. void main() {
  12.  
  13. texcoord = gl_TextureMatrix[0] * gl_MultiTexCoord0;
  14.  
  15. //vec4 position = gl_ModelViewMatrix * gl_Vertex;
  16.  
  17. vec4 tempver = gl_Vertex;
  18. tempver.x += sin(191*abs(gl_Vertex.z-8)*abs(gl_Vertex.y-8))/20;
  19. tempver.y += sin(191*abs(gl_Vertex.x-8)*abs(gl_Vertex.z-8))/20; //change the 20's lower for more power
  20. tempver.z += sin(191*abs(gl_Vertex.y-8)*abs(gl_Vertex.x-8))/20;
  21. vec4 position = gl_ModelViewMatrix * tempver;
  22.  
  23. float distanceSquared = position.x * position.x + position.z * position.z;
  24.  
  25. position.y += 5*sin(distanceSquared*sin(float(frameTimeCounter*20 + 36000)/143.0)/1000);
  26.  
  27. float y = position.y;
  28. float x = position.x;
  29.  
  30. float om = sin(distanceSquared*sin(float(frameTimeCounter*20 + 36000)/256.0)/5000) * sin(float(frameTimeCounter*20 + 36000)/200.0);
  31.  
  32. position.y = x*sin(om)+y*cos(om);
  33. position.x = x*cos(om)-y*sin(om);
  34.  
  35.  
  36. gl_Position = gl_ProjectionMatrix * position; //Update position of matrix
  37.  
  38. color = gl_Color;
  39.  
  40. lmcoord = gl_TextureMatrix[1] * gl_MultiTexCoord1;
  41.  
  42. gl_FogFragCoord = gl_Position.z;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement