akuehn3000
Newcomer
- Joined
- Jan 29, 2004
- Messages
- 18
I´m trying to use texture blending with the textures from the mfctex sample.
With the following code the first texture gets just darkened instead of
being illuminated like
the lightmap. Does anyone has any idea what´s wrong?
device.SetTexture(0,brickTexture);
device.TextureState[0].ColorOperation = TextureOperation.SelectArg1;
device.TextureState[0].ColorArgument1 = TextureArgument.TextureColor;
device.TextureState[0].AlphaOperation = TextureOperation.SelectArg1;
device.TextureState[0].AlphaArgument1 = TextureArgument.TextureColor;
device.TextureState[0].ResultArgument = TextureArgument.Current;
device.SetTexture(1,spotlightTexture);
device.TextureState[1].ColorOperation = TextureOperation.Modulate;
device.TextureState[1].ColorArgument1 = TextureArgument.TextureColor;
device.TextureState[1].ColorArgument2 = TextureArgument.Current;
device.TextureState[1].AlphaOperation = TextureOperation.Disable;
device.TextureState[1].ResultArgument = TextureArgument.Current;
meshc.DrawSubset(0);
With the following code the first texture gets just darkened instead of
being illuminated like
the lightmap. Does anyone has any idea what´s wrong?
device.SetTexture(0,brickTexture);
device.TextureState[0].ColorOperation = TextureOperation.SelectArg1;
device.TextureState[0].ColorArgument1 = TextureArgument.TextureColor;
device.TextureState[0].AlphaOperation = TextureOperation.SelectArg1;
device.TextureState[0].AlphaArgument1 = TextureArgument.TextureColor;
device.TextureState[0].ResultArgument = TextureArgument.Current;
device.SetTexture(1,spotlightTexture);
device.TextureState[1].ColorOperation = TextureOperation.Modulate;
device.TextureState[1].ColorArgument1 = TextureArgument.TextureColor;
device.TextureState[1].ColorArgument2 = TextureArgument.Current;
device.TextureState[1].AlphaOperation = TextureOperation.Disable;
device.TextureState[1].ResultArgument = TextureArgument.Current;
meshc.DrawSubset(0);