Guest User

Untitled

a guest
Oct 22nd, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. uniform float amplitude;
  2.  
  3. attribute float displacement;
  4.  
  5. varying vec3 vNormal;
  6. varying vec2 vUv;
  7.  
  8. void main() {
  9.  
  10. vNormal = normal;
  11. vUv = ( 0.5 + amplitude ) * uv + vec2( amplitude );
  12.  
  13. vec3 newPosition = position + amplitude * normal * vec3( displacement );
  14. gl_Position = projectionMatrix * modelViewMatrix * vec4( newPosition, 1.0 );
  15.  
  16. }
Add Comment
Please, Sign In to add comment