Guest User

Untitled

a guest
May 25th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 int worldTime;
  10.  
  11. void main() {
  12.  
  13.     texcoord = gl_TextureMatrix[0] * gl_MultiTexCoord0;
  14.    
  15.     vec4 position = gl_Vertex;
  16.  
  17.     if (mc_Entity.x == 31.0 && texcoord.t < 0.15) {
  18.         float magnitude = sin(worldTime * 3.14159265358979323846264 / 172.0) * 0.2;
  19.         position.x += sin(worldTime * 3.14159265358979323846264 / 86.0) * magnitude;
  20.         position.z += sin(worldTime * 3.14159265358979323846264 / 72.0) * magnitude;
  21.     }
  22.     if (mc_Entity.x == 59.0 && texcoord.t < 0.35) {
  23.         float magnitude = sin(worldTime * 3.14159265358979323846264 / 172.0) * 0.2;
  24.         position.x += sin(worldTime * 3.14159265358979323846264 / 82.0) * magnitude;
  25.         position.z += sin(worldTime * 3.14159265358979323846264 / 78.0) * magnitude;
  26.     }
  27.     if (mc_Entity.x == 18.0 && texcoord.t < 0.20) {
  28.         float magnitude = sin(worldTime * 3.14159265358979323846264 / 172.0) * 0.2;
  29.         position.x += sin(worldTime * 3.14159265358979323846264 / 86.0) * magnitude;
  30.         position.z += sin(worldTime * 3.14159265358979323846264 / 78.0) * magnitude;
  31.     }
  32. if (mc_Entity.x == 8.0 && texcoord.t < 0.20) {
  33.         float magnitude = sin(worldTime * 3.14159265358979323846264 / 172.0) * 0.2;
  34.         position.x += sin(worldTime * 3.14159265358979323846264 / 86.0) * magnitude;
  35.         position.z += sin(worldTime * 3.14159265358979323846264 / 78.0) * magnitude;
  36.     }
  37. if (mc_Entity.x == 9.0 && texcoord.t < 0.20) {
  38.         float magnitude = sin(worldTime * 3.14159265358979323846264 / 172.0) * 0.2;
  39.         position.x += sin(worldTime * 3.14159265358979323846264 / 86.0) * magnitude;
  40.         position.z += sin(worldTime * 3.14159265358979323846264 / 78.0) * magnitude;
  41.     }
  42.  
  43.  
  44.     gl_Position = gl_ProjectionMatrix * (gl_ModelViewMatrix * position);
  45.        
  46.     color = gl_Color;
  47.    
  48.     lmcoord = gl_TextureMatrix[1] * gl_MultiTexCoord1;
  49.    
  50.     gl_FogFragCoord = gl_Position.z;
  51. }
Add Comment
Please, Sign In to add comment