Download

Create a panning material that only appears in the Depth Pass.

So I am trying to create a component flow system that, when enabled, will activate a post process and provide a flow from one component to the next. Similar to how the detective vision works in the Batman Arkham games. Currently I have it set up to do the necessary post process effects as well as the toggle on and off of the effect. I also have it so that various components are masked in the depth pass using Depth Stencils. These various masks/stencils display different colors based upon what the component does as well as throws an outline around all objects with custom depth enabled.

Where I am running into an issue is the paths that go between each component. I have a spline mesh to allow for easy editing of the paths. My question is, is there anyway to setup a panning material on the spline meshes that will only render in the depth pass? I ask because I want essentially a flowing gradient leading from one object to the next which is easiest to do if I can make the panning just follow object UVs rather than world space which is what I am using for the components themselves since they do not necessarily need directionality on them.