TGViewer
Everyday Unity Everyday Unity @everydayunity · 1.18K subscribers
Post #2120 220
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
  • 👍 3
More from @everydayunity
  1. Oct 2, 2026Customize Claude Code with mods in TypeScript You can now make mods for Claude cli and app…
  2. Sep 24, 2026Now you can change the effort mid session in new Claude. So the advice about caching from…
  3. Sep 24, 2026We were wondering in the comments what Claude reset does. Here is the answer https://www.r…
  4. Sep 22, 2026Introducing GPT‑6 Sol and Luna And better & cheaper sol and luna as an immediate response…
  5. Sep 22, 2026Introducing Claude Opus 5.5 \ Anthropic Cost and speed. Opus 5.5 requires less compute to…
  6. Sep 21, 2026Claude Code effort level and model selection effort means more than just "thinking time."…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →