<div dir="ltr">Hi Daven,<div><br></div><div>you can try </div><div>gl_FrontColor = vec4(clr,clr,clr,1.0)*vec4(1,0,0,1);<br></div><div><br></div><div>It will color it in red. The "shading" is calculated in the color - actually it is not shaded properly, you might want to use some lighting for more proper results. Here is a link for some inspiration:</div><div><br></div><div><a href="http://www.ozone3d.net/tutorials/glsl_lighting_phong.php">http://www.ozone3d.net/tutorials/glsl_lighting_phong.php</a><br></div><div><br></div><div>Hope this helps</div><div><br></div><div>Cheers!</div><div>Nick</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 5, 2016 at 8:54 AM, Daven Hem <span dir="ltr"><<a href="mailto:osgforum@tevs.eu" target="_blank">osgforum@tevs.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
Trajce Nikolov<br>
Thank you for your reply.<br>
We can find your code on this URL:<br>
<a href="https://groups.google.com/forum/#!topic/osg-users/o8ovoo271lA" rel="noreferrer" target="_blank">https://groups.google.com/<wbr>forum/#!topic/osg-users/<wbr>o8ovoo271lA</a><br>
<br>
I changed some colors such as gl_FrontColor in geomSource, but result is odd. The shading effect doesnot work. I attached scene image.<br>
Please hint me.<br>
<span class="">Thank you!<br>
<br>
Cheers,<br>
Daven<br>
<br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=69245#69245" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=69245#<wbr>69245</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>