June 24, 2024, 12:05:24 AM


IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!

How to set alpha level for a custom mesh ?

Started by Guilect, August 30, 2008, 07:16:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


August 30, 2008, 07:16:51 PM Last Edit: September 01, 2008, 02:33:13 PM by Guilect
I see where you can set the alpha value during creation of a mesh:
#<VERTEX1TEXTURE>pVB.diffuseColor = RGBA(255,255,255,255)

I see commands for setting how the alpha blending is done:

How does one adjust the alpha value on an already made mesh?
For example to gradually fade out the image.
Do you have to lock vertex buffers and do this stuff again:
#<VERTEX1TEXTURE>pVB.diffuseColor = RGBA(255,255,255,128)

It would be nice to be able to just do:
Maybe someone has made a function to do this for any passed mesh:
sub SetAlpha(temp as C3DMesh)

Ionic Wind Support Team

Use a material and set the diffuse alpha component.

ret.SetAlphaArg1(0, D3DTA_DIFFUSE)
ret.SetAlphaOperation(0, D3DTOP_SELECTARG1)

Ionic Wind Support Team


Thanks for the reply.

(Now I know why I usually work in 2D  :P )

Steven Picard

Steven Picard