View Full Version : Read Near/Far Clip plane in shader
05-05-2006, 01:36 PM
I need the near and far clip plane values in my shader. How do I do this? I have tried gl_DepthRange.near and .far, but these values seem clapmed [0,1].
gl_DepthRange values are in window coordinates and they will always be remapped, not clamped, to [0,1].
Your perspective projection defines this range in world coordinates together with glDepthRange().
I guess you will need to pass these values as uniforms.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.