Roger James wrote:
Sorry, I got the equations wrong/unclear as usual. They should be:- 1. Texture present and transparent.a * transparency opaque fb.r = fb.r * (1.0f - mat.a ) + mat.r * mat.a fb.g = fb.g * (1.0f - mat.a) + mat.g * mat.a fb.b = fb.b * (1.0f - mat.a) + mat.b * mat.a fb.a = fb.a * (1.0f - mat.a) + mat.a * mat.a 2. Texture present and transparent.a * transparency not opaque factor = transparent.a * transparency fb.r = fb.r * (1.0f - factor ) + mat.r * factor fb.g = fb.g * (1.0f - factor ) + mat.g * factor fb.b = fb.b * (1.0f - factor ) + mat.b * factor fb.a = fb.a * (1.0f - factor) + mat.a * factor 3. No texture and transparency * transparent * mat.a not opaque factor = transparent.a * transparency * mat.a fb.r = fb.r * (1.0f - factor ) + mat.r * factor fb.g = fb.g * (1.0f - factor ) + mat.g * factor fb.b = fb.b * (1.0f - factor ) + mat.b * factor fb.a = fb.a * (1.0f - factor) + mat.a * factor On looking at equation 3 it would probably need to be partially implemented in a shader as mat.a is the result of the lighting calculation. But then I am not sure how you would turn the blender off! So it is probably better use the the diffuse alpha instead of mat.a, or maybe ignore mat.a altogether. Comments anyone? Roger |
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

