Search Unity

Question Shadergraph position node doesn't work when no main camera rendering to screen

Discussion in 'Universal Render Pipeline' started by seiji_unity623, Mar 2, 2023.

  1. seiji_unity623

    seiji_unity623

    Joined:
    Oct 15, 2022
    Posts:
    6
    I have a shader graph that uses the position node (world space of rendered fragment). I use the position node to determine how I should set the alpha of an object.

    The shader stops working when I set the main camera's target to a render texture. Is this expected behavior? Additionally, if I render the fragment's world space as the color, it shows all black.

    What's worse, is that the behavior is inconsistent, the shader does not work on android/ios, but does work within the editor. Though, rendering the world space as the color shows all black in either case.