
Multipasses and multitextures
Hi,
Because of my TNT card only support two texture stages I wonder how I can make all the diffrent OP''s using multipass.
I''m currently using Direct3DIM btw
The question follows ...
How do I do ADD, ADD_SIGNED, ADD_SIGNED2X, MODULATE, MODULATE2X, MODULATE4X, SUBTRACT etc. etc.
Using multipasses insted of using multitexturing?

To get these effects in multipass, you have to enable alphablending. Alpha blending is done with the following equation:
Final = Dest * DestBlend + Src * SrcBlend, where dest is the pixel on the screen and src is the texel color.
Valid blends in D3D are: SRCCOLOR, INVSRCCOLOR, SRCALPHA, INVSRCALPHA, DESTCOLOR, INVDESTCOLOR, DESTALPHA, INVDESTALPHA, ONE, and ZERO.
Add:
Final = Dest + Src
DESTBLEND = 1, SRCBLEND = 1.
Modulate:
Final = 0 * Dest + Src * DESTCOLOR
DESTBLEND = 0, SRCBLEND = DESTCOLOR (or vice versa.)
Modulate2x:
Final = Dest*Src + Src*Dest
DESTBLEND = SRCCOLOR, SRCBLEND = DESTCOLOR
Haven''t tried this one, but looks like it should work, but it''ll take 4 passes. And if you have to do multipass, it''s probably on an older card with a lower fillrate.
Modulate4x:
Final = Dest*Src + Src*Dest
Final = 1*Dest + Src*Dest
Final = 1*Dest + Src*Dest
One thing to note: Permedia 2 cards have a limited support of different blend combinations, so you may bump into trouble on those cards.
The others are somewhat harder. You may be able to use INVSRCCOLOR for subtract, and that''d be pretty close for most, but way off for source = 0.
Final = Dest * DestBlend + Src * SrcBlend, where dest is the pixel on the screen and src is the texel color.
Valid blends in D3D are: SRCCOLOR, INVSRCCOLOR, SRCALPHA, INVSRCALPHA, DESTCOLOR, INVDESTCOLOR, DESTALPHA, INVDESTALPHA, ONE, and ZERO.
Add:
Final = Dest + Src
DESTBLEND = 1, SRCBLEND = 1.
Modulate:
Final = 0 * Dest + Src * DESTCOLOR
DESTBLEND = 0, SRCBLEND = DESTCOLOR (or vice versa.)
Modulate2x:
Final = Dest*Src + Src*Dest
DESTBLEND = SRCCOLOR, SRCBLEND = DESTCOLOR
Haven''t tried this one, but looks like it should work, but it''ll take 4 passes. And if you have to do multipass, it''s probably on an older card with a lower fillrate.
Modulate4x:
Final = Dest*Src + Src*Dest
Final = 1*Dest + Src*Dest
Final = 1*Dest + Src*Dest
One thing to note: Permedia 2 cards have a limited support of different blend combinations, so you may bump into trouble on those cards.
The others are somewhat harder. You may be able to use INVSRCCOLOR for subtract, and that''d be pretty close for most, but way off for source = 0.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement