Robert,

LOL @ mis-reading my question. 😊

How would you check the values of vertices?  I just need to see the transformed 
values of a vertex.

Thanks,

-M

----------------------------------------
Marlin Rowley
Software Engineer, Staff

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
marlin.r.row...@lmco.com

-----Original Message-----
From: osg-users <osg-users-boun...@lists.openscenegraph.org> On Behalf Of 
Robert Osfield
Sent: Friday, September 28, 2018 3:41 AM
To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org>
Subject: EXTERNAL: Re: [osg-users] Value of a variable in shaders?

Hi Marlin,

On Fri, 28 Sep 2018 at 07:40, Robert Osfield <robert.osfi...@gmail.com> wrote:
> To pass data into shaders you have use a combination of uniforms 
> (osg::Unfiorm), textures (osg::Textre*) and vertex attributes.  With recent 
> 3.4.x onwards you also have the option of passing in constants via 
> #prama(tic) shader composition system that passes #define values into the 
> compilation of shaders.

Seems I mis-read your question :-)

Testing internal values in shader is an easy thing to do, what I end up doing 
is build up shaders bit by bit making sure each bit works on it's own before I 
assemble it into a more complex shader.  When I want to test values I usually 
just set the fragment colour value, though often this will have a processed 
version of the value to make it visible.  You can use #ifdef's in shaders to 
toggle the debug code paths and even toggle these paths on/off via the 
osg::StateSet::setDefine("ENABLE_DEBUG");

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to