<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Marlin,<br>
<br>
in case you want to know the value of a variable (not uniform) of a
shader <br>
there is no way (to my knowledge) inspecting it like in a debugger.
<br>
The usual workaround is visualizing things by coloring the output
pixels.<br>
If you want to "see" the "value" of a normal vector you can just
take it as a <br>
color and set it in the fragment shader as the output color.<br>
Be creative when "debugging" other values: Bools or thresholds go
black and white etc.<br>
If you have to "debug" values in vertex or geometry shaders, just
pass colors to the fragment shader.<br>
<br>
I hope this helps a little.<br>
<br>
- Werner -<br>
<br>
<div class="moz-cite-prefix">Am 28.09.2018 um 08:40 schrieb Robert
Osfield:<br>
</div>
<blockquote type="cite"
cite="mid:CAFN7Y+UpeT6GTQN4Oo8O9KAHt5Pidwa3GSvJmt7+HcktOW0k8w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div dir="ltr">Hi Marlin,<br>
<br>
<div class="gmail_quote">
<div dir="ltr">On Thu, 27 Sep 2018 at 19:30, Rowley, Marlin R
<<a href="mailto:marlin.r.rowley@lmco.com"
moz-do-not-send="true">marlin.r.rowley@lmco.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="#0563C1" vlink="#954F72" lang="EN-US">
<div class="m_8875526140072309285WordSection1">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.</div>
</div>
</blockquote>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.<br>
</div>
<div><br>
</div>
<div>Robert.<br>
</div>
<div> </div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
osg-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a>
</pre>
</blockquote>
<br>
</body>
</html>