Hi Robert,

I tried to simplify the scene graph (no shadow, effects, textures, shaders...) 
and the problem was still there.
I originally disabled back face culling since I have 2-sided lighting with 
different material.

So I supposed it is the expected behaviour for mirrored nodes and I try add 
some code to adjust the result.

With mirroring the direction of face normals changes so I first tried to update 
all normals (hoping they are also used to distinguish front and back face) but 
it did not work.
I thought to revert all faces directions changing primitive sets but this means 
to change the geometry and it is not so straightforward.

Reverting faces using statesets works fine.... 
it is not ideal becouse I always need to check the matrix and also I need to 
recourse all children of a mirrored node to apply the FrontFace state (becouse 
children can have a transformation that reset the mirroring).

If you have any other suggestion please let me know.

I will also go in depth with your suggestion to use a multipass shader to avoid 
multiple effect groups. Thank you.
I still have some issues with multipass shaders due to interaction with Qt... 
but I will try to go to this direction.

Ale

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





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to