[osg-users] EXTERNAL: Re: Value of a variable in shaders?

Rowley, Marlin R marlin.r.rowley at lmco.com
Fri Sep 28 06:38:56 PDT 2018


Robert,

I’ve written the shaders already and am well-versed in writing them.  I just need a debugging tool that will allow me to see their values at runtime.

----------------------------------------
Marlin Rowley
Software Engineer, Staff
[cid:image002.jpg at 01D39374.DEC5A2E0]
Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
marlin.r.rowley at lmco.com<mailto:marlin.r.rowley at lmco.com>

From: osg-users <osg-users-bounces at lists.openscenegraph.org> On Behalf Of Robert Osfield
Sent: Friday, September 28, 2018 1:40 AM
To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
Subject: EXTERNAL: Re: [osg-users] Value of a variable in shaders?

Hi Marlin,
On Thu, 27 Sep 2018 at 19:30, Rowley, Marlin R <marlin.r.rowley at lmco.com<mailto: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/189e1c86/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3114 bytes
Desc: image001.jpg
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180928/189e1c86/attachment.jpg>


More information about the osg-users mailing list