Unity-HDRP-GPU-View-Cone: View Cone, Field of View, Sight Cone - done with custom Shadow Mapping in Unity HDRP
The technique used is basically the shadow mapping. Rendering the depth texture from the eyes of the enemy, then checking which spots are visible to the player AND the enemy and only drawing on overlapping pixels. The performance cost should be like having a spotlight with shadows turned on.
Since the latest few HDRP Upgrades the system doesn't work in builds anymore. So consider this repo just for learning purposes on how to theoretically set up custom shadow mapping
https://github.com/leorid/Unity-HDRP-GPU-View-Cone
#hdrp #lineofsight #viewcone
Post #2120
220

- 👍 3