Hi Marlin,

On Thu, 27 Sep 2018 at 19:30, Rowley, Marlin R <marlin.r.row...@lmco.com>
wrote:

> Is there a way to examine variable values in shader code? I can’t figure
> out this problem that we are having unless I can see the values in the
> shaders.
>

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.

Shaders are a big topic so it's impossible for me to give you a full guide,
there are plenty of reosurces online about GLSL shaders, within the OSG
search for uses of osg::Program, osg::Shader, osg::Uniform.

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

Reply via email to