khces
Member
|
Alpha mode
How to mesh with the alpha mode ? (ALPHA_NONE,
ALPHA_BLEND,
ALPHA_BLEND_KEEP,
ALPHA_BLEND_DEC,
ALPHA_ADD,
ALPHA_ADD_KEEP,
ALPHA_ADDBLEND_KEEP,
ALPHA_MUL,
ALPHA_MIN,
ALPHA_MAX,
)
RM_BLEND?
.....
ex) SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR);
SetRenderState( D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR);
My english sorry ^^;
(This post was last modified: 03-17-2010 02:59 PM by khces.)
|
|
03-17-2010 02:52 PM |
|
Esenthel
Administrator
|
RE: Alpha mode
Hello Khces,
I assume you're talking about Mesh class. In that case you need to set material technique in Material Editor to the "Blend" mode.
After that all you need to do is call Mesh::draw in RM_PREPARE mode.
This will detect the "blend" material technique and later draw the mesh with alpha blending automatically.
|
|
03-17-2010 03:34 PM |
|
Esenthel
Administrator
|
RE: Alpha mode
currently manually specifying blend modes is not supported.
which combinations would you require?
|
|
03-17-2010 05:00 PM |
|
khces
Member
|
RE: Alpha mode
Can you support these mode
1. ) SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR);
SetRenderState( D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR);
2. ) SetRenderState( D3DRS_SRCBLEND, D3DBLEND_INVSRCCOLOR);
SetRenderState( D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR);
3. ) SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCCOLOR);
SetRenderState( D3DRS_DESTBLEND, D3DBLEND_SRCALPHA);
4. ) SetRenderState( D3DRS_TEXTUREFACTOR, D3DCOLOR_ARGB() );
thanks in advance!
|
|
03-18-2010 03:58 AM |
|
Esenthel
Administrator
|
RE: Alpha mode
I'll look into it when I'm finished with DX10/11
|
|
03-22-2010 03:23 AM |
|
Esenthel
Administrator
|
RE: Alpha mode
Hello,
I've analyzed this, and it is suggested to use custom shaders (according to provided tutorials).
This is the recommended method as it allows you to have much more control in the rendering, while not complicating the render process by specifying custom blend modes.
|
|
04-30-2010 09:31 AM |
|