Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

How to show something behind an occlusion shader?

Example scene:
- After mapping out a room, we detect that there is a Wall divider, and the enemy is setup to hide behind it.

I have the occlusion renderer on the wall surface, which successfully hides the enemy.

However, the enemy has a beacon on them. That beacon I want the player to be able to see. I.e. it should show up through the occlusion shader wall.

Is that possible? How do I modify the shader of the beacon object or of the wall to see it?

Best Answer

Answers

  • Options
    james_ashleyjames_ashley ✭✭✭✭

    I think the easiest path would be to draw a raycast from the camera to the beacon and determine where the wall intercepts your line. Then place a copy of the beacon just in front of your occlusion.

    James Ashley
    VS 2017 v5.3.3, Unity 2017.3.0f3, MRTK 2017.1.2, W10 17063
    Microsoft MVP, Freelance HoloLens/MR Developer
    www.imaginativeuniversal.com

  • Options

    ZTest did it. :D Thanks!

Sign In or Register to comment.