Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. varying vec2 depth;
  2.  
  3. void main()
  4. {
  5. #if LINEAR_RANGE
  6.         float finalDepth = depth.x;
  7. #else
  8.         float finalDepth = depth.x / depth.y;
  9. #endif
  10.     // just smear across all components
  11.     // therefore this one needs high individual channel precision
  12.  
  13.         gl_FragColor = vec4(finalDepth, finalDepth, finalDepth, 1);
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement