Search Unity

Question Stencil Shader and Vuforia in Unity URP causes Camera (Default & AR) Output Blue

Discussion in 'Universal Render Pipeline' started by _milla_, Apr 23, 2023.

  1. _milla_

    _milla_

    Joined:
    Aug 29, 2013
    Posts:
    3
    I want to embed a stencil shader from the tutorial "Impossible Geometry with Stencil Shaders in Unity URP" by Daniel Ilett. after following all steps and implement vuforia engine, i get a blue camera output. (AR AND Default Scene Camera) The setup is as follows:
    Unity 2021.3.9f | Vuforia 10.14.4.| URP 12.1.7
    1. write a stencil shader
    2. in the inspector: create a new Layer "StencilLayer1"
    3. put all object - affected by the shader - in the Layer "StencilLayer1"
    4. put the Stencil Shader on the Stencil Object
    5. go to the "URP Asset Renderer" in the Inspector. i applied the settings as described in the tutorial.
    I went though the original unityproject (provided on GitHub by Daniel Ilett) and changed settings one after the other. Everything works fine til importing the Vuforia package. neither the Main Camera nor the AR Camera do render the scene - just a blue camera image - in unity scene view everything is working properly.
    Trying to figure out which setting could be wrong, it happened, that as soon as i deactivate the Layer with the objects inside in the "Filtering - LayerMask" selector in the "URP Asset Renderer", the Camera output is blue.

    EDIT: Everything shows up after building the scene to my devices (android/ios) but still not on PC. Scene-View and Game-View are showing up, but as soon as i hit play, the camera output is blue. is there a way to get the Play-Mode running in Unity with my setup, so i don't have to fall back to unity built in render pipeline. now i hardly can test something and the development workaround would be super inefficient.

    I really would appreciate any hint. THANKs in advance! milla
     
    Last edited: Apr 24, 2023
  2. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    395
    Hi, I seem to have the same issue with a blue background from the VideoBackground. Did you manage to find a solution?