Search Unity

Question URP Shadergraph screenposition showing not correctly

Discussion in 'Universal Render Pipeline' started by yanjingzhaisun, Aug 11, 2020.

  1. yanjingzhaisun

    yanjingzhaisun

    Joined:
    Jun 30, 2013
    Posts:
    11
    Hi Forum,

    Here I have a very weird problem. I'm using shadergraph to create a toon shader, everything else works fine, but the outline subshader is showing not correctly. It perfectly works in the scene view, yet in the game view, it doesn't seems to follow the camera:



    As I move the view in the scene, the outline follows the character; yet in the game view, the outline stays and not following the in-game camera. The outline in the game view actually uses the scene view's viewport to generate the screen position.

    Is this a known bug or did I miss any setting in urp?

    Best,
     
  2. yanjingzhaisun

    yanjingzhaisun

    Joined:
    Jun 30, 2013
    Posts:
    11
    I think I figure it. It's depth texture, in order to let the urp load successfully I need to turn on depth texture: