d3d_device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
d3d_device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
d3d_device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
d3d_device->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
d3d_device->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
d3d_device->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
d3d_device->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_DIFFUSE);
Fixed function texturing help
I know how to do this with shaders, but I can't figure out how to set up all the render states and texture stages to get this working with the fixed function pipeline. What I want to do is apply a diffuse colour to vertices using an alpha mask from a texture file.
This is what I have, but it doesn't work.
Thanks
s.
Lets just hope ntnbet picks up on this thread - he's usually pretty hot on the fixed function texture cascade [cool]
I'm pretty sure you need to get a D3DTOP_MODULATE (or D3DTOP_PREMODULATE) in there somewhere. Maybe even:
D3DTSS_COLOROP = D3DTOP_MODULATE
D3DTSS_COLORARG1 = D3DTA_DIFFUSE
D3DTSS_COLORARG2 = D3DTA_TEXTURE
??
Writing these out on paper always helped me prior to ditching FF effects.
hth
Jack
I'm pretty sure you need to get a D3DTOP_MODULATE (or D3DTOP_PREMODULATE) in there somewhere. Maybe even:
D3DTSS_COLOROP = D3DTOP_MODULATE
D3DTSS_COLORARG1 = D3DTA_DIFFUSE
D3DTSS_COLORARG2 = D3DTA_TEXTURE
??
Writing these out on paper always helped me prior to ditching FF effects.
hth
Jack
Quote:Original post by jollyjeffersI'm struggling with the idea that someone who knows shaders is voluntarily adding fixed pipeline support. Unless a publisher makes you do it, stay away! Once the GeForce4MX and GeForceFX series are considered completely outdated, we can finally rejoice in pure shader glory. (Seriously, we just added fixed pipe support to a game because the FX series cards pixel shaders are way too slow).
Lets just hope ntnbet picks up on this thread - he's usually pretty hot on the fixed function texture cascade [cool]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement