Hi Vivien,
On Sat, Feb 26, 2011 at 1:49 PM, Vivien Delage <[email protected]> wrote: > I modified the main vertex shader of the standard shadow map to allow for > user defined clipplanes. > This is actually just one line added to the main: > > gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex; The svn/trunk version of StandardShadowMap.cpp now has an optional compile path that by default now doesn't set the vertex shader, so you modification would only effect the old path. The changes to StandardShadowMap aren't finalized though so I might come back change the defaults. I was also wondering why you separately compute the gl_ClipVertex when the same gl_ModelViewMatrix * gl_Vertex computation is used in the line that follows your addition. While a GLSL compile could spot this and do the computation once and reuse the value there is chance that this optimization won't happen so it'd be better to just use the computed value. Given the uncertainly nature of the changes to the shaders setup in StandardShadowMap.cpp I don't think it's appropriate to merge your suggested change right now. For you own app you could override the default implementations. It might even be that with no vertex shader being set by StandardShadowMap the built in GL vertex program will work just fine for you, setting the clip planes as required. Robert. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
