Thanks Mathiey, these changes make the code more readable, efficient and portable across drivers/platforms :-) Changes now merged and submitted to svn/trunk. Cheers, Robert.
On Thu, Dec 3, 2009 at 3:35 PM, Mathieu Marache <[email protected]> wrote: > I replaced the Vec4 by a float and used only the x component of the > shadow2DProj . This works on my apple box. > > > > > Le 2 déc. 09 à 16:21, Robert Osfield a écrit : > >> Hi Mathieu, >> >> On Wed, Dec 2, 2009 at 3:04 PM, Mathieu Marache >> <[email protected]> wrote: >>> >>> I don't want to bother you, but since you seem to be in the process of >>> merging new submissions I'd like to make this little one surface from the >>> deepness of the submission folder. >> >> Sorry about not getting to it yet. I'm surprised I had already >> tackled it so it must have been a bit buried... >> >> I've just done a quick review and am curious about the lines you've >> changed, in particular I'm not even sure what is meant by the original >> code, and your changes doesn't seem to clarify this for me, just a fix >> in the type. Perhaps you understand it better. The original code is: >> >> declaration of shadow variable: >> >> " vec4 shadow = vec4(0.0, 0.0, 0.0, 0.0); \n" >> >> >> Then the offending line: >> >> " if ( shadow * (shadow -1.0) != 0.0 ) \n" >> >> What I'm not sure about is what is intended by the (shadow-1.0), and >> what is intended by the * operator. >> >> My guess about this line of code is that it's attempting to only true >> when shadow != vec4(0,0,0,0) && shadow != vec4(1,1,1,1) i.e. when the >> shadow is full on or full off. >> >> I do wonder if the shadow variable actually needs to be a vec4 as well. >> >> Thoughts? >> Robert. >> _______________________________________________ >> osg-submissions mailing list >> [email protected] >> >> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > Mathieu > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
