Sign in to follow this  
Metty

[MDX] Some serious results when applying texturestates to an object?

Recommended Posts

DxDevice.TextureState[1].ColorOperation = TextureOperation.SelectArg1;
DxDevice.TextureState[1].ColorArgument1 = TextureArgument.Constant;
DxDevice.TextureState[1].ConstantColor = Color.Blue;
When just applying this texture states to an object, the object is rendered with some serious trash-like colours... See: http://web48.isp4net.de/other/trash.jpg When rendering the scene new, these colors move around in the object...and in the debug-mode of DX the program just crashs..

Share this post


Link to post
Share on other sites
Did you disable stage 2? Stages must terminate with a disable op.

Did you set an alpha op for stage 1? It is invalid to specify only color or alpha on a stage. Both must be given.

Does your card support per stage constant? (D3DPMISCCAPS_PERSTAGECONSTANT)

I'm assuming there is a stage 0 set. What does it do, since you're overwriting it's color output in stage 1 anyway?

Share this post


Link to post
Share on other sites
well, its just a test...the problem was that the doesn't support per-stage constants.....but how to just use a color then?

Share this post


Link to post
Share on other sites
D3DRS_TEXTUREFACTOR
and
D3DTA_TFACTOR

Some older cards (RagePro -- ATI XPert98 and such) don't handle TFACTOR correctly.

It's much easier to just use a vertex shader. They can be software emulated on older cards and make it much easier.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this