Multiple lighting passes in a shader

Started by
10 comments, last by simotix 15 years, 10 months ago
What's your code for setting up the effect and rendering? Also I think you probably want your effect states set like this:

technique TwoLight{	pass pass0	{                AlphaBlendEnable = false;		ZEnable = true;                ZWriteEnable = true;		VertexShader = compile vs_2_0 VS(0);		PixelShader = compile ps_2_0 PS(0);	}      	pass pass1	{        	AlphaBlendEnable = true;                ZEnable = true;                ZWriteEnable = false;		SrcBlend= ONE;		DestBlend=ONE;		BlendOp = ADD;		VertexShader = compile vs_2_0 VS(1);		PixelShader = compile ps_2_0 PS(1);	}}
Advertisement
Thanks a lot MJP, it turns out that it was because I was not setting AlphaBlendEnable back to false on the first pass.

This topic is closed to new replies.

Advertisement