Search Unity

Question View Direction Node

Discussion in 'Shader Graph' started by andyz, Dec 7, 2020.

  1. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,269
    There are different coordinate spaces for this but as the documentation says: "This is the vector from the vertex or fragment to the camera".
    So what has the coordinate space - Object, View, World, Tangent, got to do with it - what does each represent?
    Is it not just from the current world-space pixel on object to the camera. ideally in view-space after objects transformed around camera?

    Also it is called 'direction' which you would assume means normalized? But it says vector 'from' which implies ObjectFromCameraVector not ViewDirection?

    Also I never know if shader graphs are all per-pixel 'fragment-shader' based?
     
    Last edited: Dec 7, 2020