Is there a scalable way to use mesh volumes in Unity such that fragments drawn within them use a different shader path?

168 Views Asked by At

I want to include invisible geometry in my scene which, for all portions of a mesh within the geometry, one texture/shading path on their shader/material is used, blending to portions of the geometry NOT within the invisible volume using a different texture/shading path.

Concretely, what I'm trying to build is an environment where certain regions are "normal colored" and anything outside those regions uses a drab/gray/cracked appearance.

I know I could add (especially algorithmic) volumes as parameters to a shader (treated similarly to lights, I suppose), but that could get fairly intensive fairly quickly if I end up with many volumes hitting any given mesh, not to mention the overhead of checking objects for intersection with each volume.

Currently I'm using URP forward rendering in Unity 2020.3.28f1.

0

There are 0 best solutions below