docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetCameraMatrices

    SetCameraMatrices(CommandBuffer, ref CameraData, bool)

    Set camera matrices. This method will set UNITY_MATRIX_V, UNITY_MATRIX_P, UNITY_MATRIX_VP to camera matrices. Additionally this will also set unity_CameraProjection and unity_CameraProjection. If setInverseMatrices is set to true this function will also set UNITY_MATRIX_I_V and UNITY_MATRIX_I_VP. This function has no effect when rendering in stereo. When in stereo rendering you cannot override camera matrices. If you need to set general purpose view and projection matrices call SetViewAndProjectionMatrices(CommandBuffer, Matrix4x4, Matrix4x4, bool) instead.

    Declaration
    public static void SetCameraMatrices(CommandBuffer cmd, ref CameraData cameraData, bool setInverseMatrices)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer to submit data to GPU.

    CameraData cameraData

    CameraData containing camera matrices information.

    bool setInverseMatrices

    Set this to true if you also need to set inverse camera matrices.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)