Probaly fairly simple question, but I'm curious what the 'right' way would be to add emittive light in my lighting 'system' (specified per material).
My first approach was multiplying the output pixel by the emittive light, but logically this gives no pixel color at all when there's no emission. So I figured adding the emittive light would be the trick. Works fine, but I doubt if this is 'the way' (maybe to much lit up?).
Here's what I've done now:
float4 amb = (AmbientColor * AmbientIntensity * MatAmb) + MatEmm; float4 diff = (input.Color * MatDiff) + MatEmm; // input.color is directional light outputted from the VS // calculate point light etc., into att_total return saturate((diff + amb + att_total) * textureColor);
Just curious if this is the right way to approach this.