Roger James wrote:

if (transparent or transparency element present in the technique)
{
    // Turn on the OpenGL blender
Calculate a blending factor using transparent and transparency according to the "opaque" mode in force. // Decide whether to use GL_SRC_XXX or GL_CONSTANT _XXX in the OpenGL blender
    if (the calculated factor would mean opacity when  applied)
Use the relevant blend factor from the incoming lit and textured fragment
    else
Use the previously calculated blending factor as a constant blend factor
}

I would appreciate any comments you have, time permitting of course.

The only thing that worries me about this is that you're using the <transparent>/<transparency> tags to decide when to enable blending. I'd suggest you add one more check to see if your calculated blending factor results in the surface being fully opaque before you enable blending. I say this because I've made a lot of use of the ColladaMAX plugin from Feeling Software, and every single model I've exported with that plugin has transparent/transparency set on all of its materials, even if they're actually fully opaque.

--"J"

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

Reply via email to