SHOW:
|
|
- or go back to the newest paste.
| 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 | ||
| 28 | ||
| 29 | gl_Position = gl_ProjectionMatrix * (gl_ModelViewMatrix * position); | |
| 30 | ||
| 31 | color = gl_Color; | |
| 32 | ||
| 33 | lmcoord = gl_TextureMatrix[1] * gl_MultiTexCoord1; | |
| 34 | ||
| 35 | gl_FogFragCoord = gl_Position.z; | |
| 36 | - | } |
| 36 | + | } |
| 37 | ||
| 38 |