I’m trying to implement Alex Vlachos very clever technique of using a stencil mesh to write in the stencil buffer to save precious GPU cycles in my VR game. I’ve already done a lot of optimization to try and optimize fillrate for my game but this seems like the ideal solution to save a huge amount.
Here is the link of the technique for more info:
The whole thing is interesting but the technique I’m talking about is on slide 59.
However, I’m at a loss on how to write in the stencil buffer in UE4. I’ve been searching RHI commands and found some related to the stencil buffer but I don’t know exactly where to start to try and implement that.
If anyone can give me an hand that would be greatly appreciated.
I need to render character vision bubbles on screen, and the bubbles may be partially displayed. Can you provide more details about using Stencil buffer with C++?
The following information would do big help:
- What class should I inherit while adding code to the project
- A block of code sample