Hello everyone! I need your help with shaders. I’m creating a mixed reality game and I want to project a terrain onto a table. I want anything outside the table to be hidden and to be able to move the terrain or advance on it within the same table board. Like in the attached photos. (One of them is the new Civilization VII VR version). How could I simulate this? Thanks!
Hello, @EduP85! How are you? I hope you’re doing great!
What you’re trying to achieve is very likely possible using Unreal’s Custom Depth & Stencil.
The idea is to have all the geometry you don’t want to be clipped populate the Stencil buffer with a specific value. Then, you can discard pixels that don’t contain those values through a post-process!
Here’s a video that might help:
I hope this helps!
Perfect! I am going to follow this video. Thank you very much for your help.