Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Where can i find the unity_CameraProjection for non stereo in HDRP to use in shader

Discussion in 'Graphics Experimental Previews' started by nasos_333, Jul 2, 2020.

  1. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,576
    Hi,

    I am trying to find the similar to HDRP Stereo declarations

    #define unity_CameraProjection unity_StereoCameraProjection[unity_StereoEyeIndex]
    #define unity_CameraInvProjection unity_StereoCameraInvProjection[unity_StereoEyeIndex]
    #define unity_WorldToCamera unity_StereoWorldToCamera[unity_StereoEyeIndex]
    #define unity_CameraToWorld unity_StereoCameraToWorld[unity_StereoEyeIndex]

    defined in EditorShaderVariables.hlsl file in HDRP

    But seems there are not similar for non stereo, like there are in URP

    Is there any other way to get those matrices in HDRP ?

    Thanks in advance
     
    Last edited: Jul 2, 2020
  2. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    540

    Sorry for english mistakes
    HDRPLove.jpg
     
    Last edited: Jul 2, 2020
    zezba9000 and HristoIvanov like this.