Hi Daven, you can try gl_FrontColor = vec4(clr,clr,clr,1.0)*vec4(1,0,0,1);
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: http://www.ozone3d.net/tutorials/glsl_lighting_phong.php Hope this helps Cheers! Nick On Sat, Nov 5, 2016 at 8:54 AM, Daven Hem <osgfo...@tevs.eu> wrote: > Hi, > Trajce Nikolov > Thank you for your reply. > We can find your code on this URL: > https://groups.google.com/forum/#!topic/osg-users/o8ovoo271lA > > I changed some colors such as gl_FrontColor in geomSource, but result is > odd. The shading effect doesnot work. I attached scene image. > Please hint me. > Thank you! > > Cheers, > Daven > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=69245#69245 > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org