I’m developing a stealth game for a Uni project, and want to create a more dynamic ‘visibility’ index for the player. My current thoughts on this have been either to raycast from all active lights and calculate a value this way, or to construct a secondary shader for the player, which renders just the player’s light values (in greyscale) to an offscreen buffer. I can then sample these to obtain how lit the player is.
Does UE4 support rendering like this to an offscreen buffer, and do you think this is a plausible way to obtain a fairly quick, accurate value? Is there a better way using graphics that might work, i.e. using light/shadow maps?