alpha blending
I''m building a sprite library that displays sprites as textures on polygons and I''m trying to implemented varying levels of transparency but I''m having some trouble. I''m only able to get 50% transparency even though I''m setting the vertex alpha values to other values. Basically I''m trying to overlay my sprite over the background with varying levels of transparency.
What are D3DRENDERSTATE_SRCBLEND and D3DRENDERSTATE_DESTBLEND render state combinations to do this?
ANy help would be great!
Fredo
~----------------------------~
Fred Di Sano
System Programmer
Artech Studios
Ottawa.CA
~----------------------------~
Are you sure your pixelformat/textureformat supports enough alpha bits to show many levels (e.g. 32bit modes)?
Yeah, I''m in 32-bit mode.
~----------------------------~
Fred Di Sano
System Programmer
Artech Studios
Ottawa.CA
~----------------------------~
~----------------------------~
Fred Di Sano
System Programmer
Artech Studios
Ottawa.CA
~----------------------------~
I use 16bits for transparency. 32 is not a problem.
I think, you may play with diffuse.a component for a many effect of transparency. (or emissive or specular?, try all!). I change this in the material and may generate many level of transparency. The point is to choice the best renderstate (srcblend and destblend). And you MUST check the compatibility with the hardware!!. In my old ati, some sample work perfecty, but in voodoo3, always see black!.
-eng3d.softhome.net-
I think, you may play with diffuse.a component for a many effect of transparency. (or emissive or specular?, try all!). I change this in the material and may generate many level of transparency. The point is to choice the best renderstate (srcblend and destblend). And you MUST check the compatibility with the hardware!!. In my old ati, some sample work perfecty, but in voodoo3, always see black!.
-eng3d.softhome.net-
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement