Slice shader

I’m attempting to make a “slice” effect to animate objects into a scene. Slicing the object itself is pretty easy, but it messes with shadow casting pretty badly.

  • The sliced portions of the object still cast shadow.
  • Other shadow can’t be seen through sliced portions of an object.
  • Since I expect that this is because the slicing isn’t being performed when creating the shadow depth texture, I expect that shadows can still be cast onto sliced portions of an object, though I have not tested this.

I’m relatively inexperienced with shader work, so is anyone able to give me a quick pointer on how to make this also work with shadows?

Thanks!

Bump?

This kind of thing works for trees, so I guess I’ll go look at how those shaders work.