Original Post
Is it possible to have both TFactor and Diffuse to control the alpha value? Say I have an array of quads and I would like to control the alpha value of each of them individually I would use the diffuse value of the vertexes to do that. But say I want to fade all of the quads out maintaining their diffuse alpha value as well can I apply a TFactor to do that? Is it possible to use both of these at the same time? Ie. Combining these states
device.SetRenderState(RenderStates.AlphaBlendEnable, true);
device.SetRenderState(RenderStates.SourceBlend, (int)Blend.SourceAlpha);
device.SetRenderState(RenderStates.DestinationBlend, (int)Blend.InvSourceAlpha);
device.SetRenderState(RenderStates.TextureFactor, System.Drawing.Color.FromArgb(alpha, 255, 255, 255).ToArgb());
device.SetTextureStageState(0, TextureStageStates.ColorArgument1, (int)TextureArgument.TextureColor);
device.SetTextureStageState(0, TextureStageStates.AlphaArgument1, (int)TextureArgument.TextureColor);
device.SetTextureStageState(0, TextureStageStates.AlphaArgument2, (int)TextureArgument.TFactor);
device.SetTextureStageState(0, TextureStageStates.AlphaOperation, (int)TextureOperation.Modulate);
and
device.SetTextureStageState(0, TextureStageStates.ColorArgument1, (int)TextureArgument.TextureColor);
device.SetTextureStageState(0, TextureStageStates.AlphaArgument1, (int)TextureArgument.TextureColor);
device.SetTextureStageState(0, TextureStageStates.AlphaArgument2, (int)TextureArgument.Diffuse);
device.SetTextureStageState(0, TextureStageStates.AlphaOperation, (int)TextureOperation.Modulate); [Edited by - Headkaze on August 12, 2008 4:55:23 PM]