Forum Discussion
gameside.2024
1 year agoExplorer
DepthAPI Occlusion Lit conflict with stencil shader
Hi there, I'm currently working on creating a local multiplayer XR experience that involves both portal effects (using a custom stencil shader) and DepthAPI to allow players to see each other in a...
jtriveri
1 year agoStart Partner
There’s no reason why you need to use the occlusion shader on the environment through the portal. You could just occlude only the stencil surface. If a stencil fragment is occluded, so is everything behind it
edit: this may not work with soft occlusion and it may not look right with the right-eye depth reprojection. I’m playing with a similar issue and will get back to you if my other solution works out
- gameside.20241 year agoExplorer
Well I tried playing with the EnvironmentDepthBias to try modify the occlusion z distance but its not working very well. I also tried occluding only the portal w/ stencil shader and here what happens :
- plane w/ stencil is occluded so there's a "mask" arround hands
- through this mask, external environment is drawn over hands so hands aren't visible
- same with every real world furniture that should be drawn over the environment- jtriveri1 year agoStart Partner
What does your stencil portal shader look like? Can you paste it here?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device