[osg-users] Clip planes and instanced rendering

Alberto Luaces aluaces at udc.es
Tue Apr 9 07:04:34 PDT 2019

Wojciech Lewandowski writes:

> Hi Alberto,
> You may need to add support for clip planes via gl_ClipVertex or gl_ClipDistance to your shaders (which one depends on GLSL version used -see
> https://stackoverflow.com/questions/19125628/how-does-gl-clipvertex-work-relative-to-gl-clipdistance). My experience with these vars was not always positive, though. I remember times when I was unable to use
> them and once had to do my own cliping in vertex shader (=major PITA). But maybe these days newer drivers or OSG version make it easier.

Hi, Wojciech, many thanks!  Following your pointer about gl_ClipDistance
I made this work.  Nevertheless I take your advice on not relying too
much in this feature for compatibility reasons :-)


More information about the osg-users mailing list