[osg-users] Value of a variable in shaders?
Robert Osfield
robert.osfield at gmail.com
Thu Sep 27 23:40:28 PDT 2018
Hi Marlin,
On Thu, 27 Sep 2018 at 19:30, Rowley, Marlin R <marlin.r.rowley at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180928/d2861de7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3114 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180928/d2861de7/attachment.jpg>
More information about the osg-users
mailing list