Hi J-S,

I have sent proposed tweaks for submission.

I think your observations prove that AlphaFunc is activated by Transparent bin. IMHO safest way with dealing with AlphaFunc/AlphaTest is to activate it explicitly as a node state attribute whenever BLEND is activated or TransparentBin is selected through RenderingBin hint. That way its always on when needed and we are not on mercy of default state sets ;-)

I think that submission I have sent is still worth adding. I made my change slightly more general so that it may be easily extended to suppress other controversial optimizations when needed.

Cheers,
Wojtek

Hi Wojtek,

Ok, now I think I understand - I will submit fix for this case or if You prefer you may do it. Basically we would want to add setter and getter for the flag which will turn off render bin override, right ?

Hmmm... I added an osg::AlphaFunc with comparison GL_GREATER 0.0 to the root of my scene graph, and it works well. So if this is the expected behavior, perhaps the ShadowedScene could have this osg::AlphaFunc by default?

    shadowedScene->getOrCreateStateSet()->setAttributeAndModes(
        new osg::AlphaFunc(osg::AlphaFunc::GREATER, 0.0),
            osg::StateAttribute::ON);

Just hypothetically, for the same end result, what would be faster:
A) overriding the renderbins and using an AlphaFunc
B) disabling the override on the renderbin

(I suspect A, but I'm not that familiar with AlphaFunc)

I think it's expected that objects with textures which have texels at alpha=0.0 will have holes in their shadows. So we should either document this clearly, or set it by default, as it wasn't at all obvious to me, at least.

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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

Reply via email to