Created
June 20, 2012 15:04
-
-
Save sortofsleepy/2960339 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uniform float amplitude; | |
attribute float displacement; | |
varying vec3 vNormal; | |
varying vec2 vUv; | |
void main() { | |
vNormal = normal; | |
vUv = ( 0.5 + amplitude ) * uv + vec2( amplitude ); | |
vec3 newPosition = position + amplitude * normal * vec3( displacement ); | |
gl_Position = projectionMatrix * modelViewMatrix * vec4( newPosition, 1.0 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment