Transparency and Shaders

Hi,

I trying to set alpha and colors components into a shader, but I always get strange results.

Without transparency :

With transparency :

I tryed many transparency mode as :

  • TransparencyAttrib.MAlpha :
    I get this strange “circle effect” you can see above in sphere.

  • TransparencyAttrib.MDual :
    Works only with a one fixed uniform color, the “circle effect” only appear with a non uniform color… ???

  • TransparencyAttrib.MMultisample :
    Doesn’t work… alpha is always equal to 0. Maybe the solution is on that mode, if only I could get it work.

I first tryed on the sphere.egg model. Also on a procedural created one. On a cube model… With the same kind of results.

I don’t know what to try now…
Vash

Hmm, looks to me like you’re seeing Z-fighting from the back side of the object. This means (a) you’re not culling reverse faces, and (b) you’re not setting a good value for the Z value to resolve depth satisfactorily.

David

Ok never mind…
I’ve worked on my shader and, I don’t understand why, the problem were finally solved.
I have probably missed something…

However, I will monitor this closely.

Anyway, thanks for your help.
Vash