How to Create A Fissure in A Wall

So, I’ve been learning about stencil buffers in order to do a sort of wall fissure like in the following screenshot:
8626290--1159041--upload_2022-11-30_18-11-29.png

The Issue I am having right now is that my game uses deferred rendering. The above relies on stencil buffers which are not available to me in the deferred rendering path. Is there any way I can achieve this same effect in deferred?

If what you see through the crack is real scene geometry, then the only option is to actually have a hole in the wall, or use a render texture with another camera that renders that room. Or stencils, but Unity has basically disabled any way of using stencils with the built in deferred pipeline as it simply ignores those render settings in the recent releases of the engine as best I can tell (though some people have supposedly had some luck).

If you don’t need what’s through the crack to be real, then I would suggest using a parallax offset mapping shader to fake the crack.

Couldn’t they combine parallax offset with alpha-clipping to see through? Clipping the parallax depth value under a certain amount.

If they wanted to use a custom material on the wall rather than as a “decal” that could be placed anywhere, yes.

Ultimately, parallax mapping is what I ended up using as I didn’t need geometry necessary. I’d say the effect is rather successful in what I had hoped to achieve.

1 Like