Lighting channels and real-time lighting
I've implemented lighting channels much like in UE3 by putting an
And it works, but only for static lights ― and only after rebuilding the level lighting. Real-time lights seem to ignore the channels, even though I made sure
Where should I look to fix that?
Okay, I've managed to implement it myself.
G-buffer B's alpha channel normally contains only the shading model ID, of which there are 6. So they only occupy 3 bits, leaving 5 bits free. I'm populating them with 5 lighting channels by properly adjusting the G-buffer encoding and decoding functions. Light channel bitmasks are injected via new uniform buffer fields in
Auxiliary code is trivial.
answered Nov 27 '14 at 12:59 PM
Leszek Godlewski (Astronauts)
Follow this question
Once you sign in you will be able to subscribe for any updates here