docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetViewAndProjectionMatrices

    SetViewAndProjectionMatrices(CommandBuffer, Matrix4x4, Matrix4x4, bool)

    Set view and projection matrices. This function will set UNITY_MATRIX_V, UNITY_MATRIX_P, UNITY_MATRIX_VP to given view and projection matrices. If setInverseMatrices is set to true this function will also set UNITY_MATRIX_I_V and UNITY_MATRIX_I_VP.

    Declaration
    public static void SetViewAndProjectionMatrices(CommandBuffer cmd, Matrix4x4 viewMatrix, Matrix4x4 projectionMatrix, bool setInverseMatrices)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CommandBuffer to submit data to GPU.

    Matrix4x4 viewMatrix

    View matrix to be set.

    Matrix4x4 projectionMatrix

    Projection matrix to be set.

    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)