EQS Fog of war/Field of vision system

Made some progress.
Disabled “render on main pass” (render settings) for cone of vision that its invisible but still draw to custom depth buffer. I also offset the vertexes that fall on objects to the objects height. This is done to make the entire face of the object “colored” visible.
Also added logic that hides and unhides objects based on the view cone. enemies can even hied behind each other!
The only problem I still have is that the view cone still clips through stuff when the camera is off center with the player, see picture in above post.

Can’t seem to upload images now so I’l do that tomorrow.