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

2018-09-28 Thread Robert Osfield
Hi Marlin, On Fri, 28 Sep 2018 at 07:40, Robert Osfield 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)

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

2018-09-28 Thread Werner Modenbach
Hi Marlin, in case you want to know the value of a variable (not uniform) of a shader there is no way (to my knowledge) inspecting it like in a debugger. The usual workaround is visualizing things by coloring the output pixels. If you want to "see" the "value" of a normal vector you can just take

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

2018-09-28 Thread Sebastian Messerschmidt
Hi, Usually you can use the output-colors in case of a fragment shader to inspect the values per fragment. Rendering to a texture and inspecting the values in the image is also an option. Another approach to display incoming/per state values is this nifty shader:

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

2018-09-28 Thread Robert Osfield
Hi Marlin, On Thu, 27 Sep 2018 at 19:30, Rowley, Marlin R 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-users] Value of a variable in shaders?

2018-09-27 Thread Rowley, Marlin R
All, 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. Any help would be appreciated Marlin Rowley Software Engineer, Staff