Hi,

I have implemented the simplest fragment shader applying only particular color 
to my primitives as this was sufficient. However now I want to create a 
composition of a simple osg::ShapeDrawable for a osg::Box and my instanced 
material (spheres), where Box should be semitransparent and so should be the 
instanced material. But what I get You can see in the attached photos. In the 
first one Box is theoretically transparent, but I can`t see the material inside 
it. In the second photo, if I am inside the Box I can see both semi 
transparent: box and material. Does anyone know how to fix it also for viewing 
box from outside to be transparent and material inside would be visible? 
Probabbly some neaty StateSet configuration or more complex fragment shader? 
Additionally - does osg support Material for instanced objects or I have to 
implement it with whole light manualy in fragment shader? I was thinking about 
some default osg fragment shader providing complete light and material handli
 ng but I think such thing does not exist. Am I wrong?


Thank you!

Cheers,
Mateusz

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=56358#56358



<<attachment: insideTransparency.png>>

<<attachment: noTransparency.png>>

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to