For the final result I want to blend the ambient together with 3 light passes but the lights are burning out as you can see.
For the example the ambient pass (p0) is pure black and the first light pass (p1) is just LdotN
That would mean: (whiteLightSpotSource x Blend.SourceAlpha) + (blackAmbientDestination x Blend.One)-> still black
So black + lightspot should be lightspot and not ueberlightspot.
It looks like my alpha is summing up over time… Is this the case and can I prevent it?
Or should I dump it and do it singlepass instead?
Which FX parser are you using? (The FX parser is specified at the top of the shader with string ParamID - for example: string ParamID = “0x000001”;). Some of the effects parsers have the nasty side effect of getting multi-pass blending wrong.
I tested this and I get the same result when using the dxsas compiler with multiple passes. It’s a bug. You’ve got two options. The first is to use the standard Max compiler. It has it’s own set of bugs, so whether or not you want to use it will depend on what you’re doing. The second option is to do both of your lights in one pass using the dxsas compiler. That’s the one I recommend.