I am working on a 2d line of sight inplementation in a top-down game. I have a function that generates a 2d custom mesh describing the visible area.
I’ve already implemented a post process that masks out pixels behind the mesh using the custom depth buffer. What I want to do is find a way to mask out pixels BENEATH (z direction) the mesh, either by projecting each pixel downwards, or extruding the mesh vertically and checking if each pixel is INSIDE the mesh. Basically what I’m trying to do is a volumetric post process with an arbitrary mesh.