ShaderVariablesMatrixDefsLegacyUnity.hlsl 977 B

123456789101112131415161718192021
  1. #ifdef UNITY_SHADER_VARIABLES_MATRIX_DEFS_HDCAMERA_INCLUDED
  2. #error Mixing HDCamera and legacy Unity matrix definitions
  3. #endif
  4. #ifndef UNITY_SHADER_VARIABLES_MATRIX_DEFS_LEGACY_UNITY_INCLUDED
  5. #define UNITY_SHADER_VARIABLES_MATRIX_DEFS_LEGACY_UNITY_INCLUDED
  6. #define UNITY_MATRIX_M unity_ObjectToWorld
  7. #define UNITY_MATRIX_I_M unity_WorldToObject
  8. #define UNITY_MATRIX_V unity_MatrixV
  9. #define UNITY_MATRIX_I_V unity_MatrixInvV
  10. #define UNITY_MATRIX_P OptimizeProjectionMatrix(glstate_matrix_projection)
  11. #define UNITY_MATRIX_I_P _InvProjMatrix
  12. #define UNITY_MATRIX_VP unity_MatrixVP
  13. #define UNITY_MATRIX_I_VP _InvViewProjMatrix
  14. #define UNITY_MATRIX_MV mul(UNITY_MATRIX_V, UNITY_MATRIX_M)
  15. #define UNITY_MATRIX_T_MV transpose(UNITY_MATRIX_MV)
  16. #define UNITY_MATRIX_IT_MV transpose(mul(UNITY_MATRIX_I_M, UNITY_MATRIX_I_V))
  17. #define UNITY_MATRIX_MVP mul(UNITY_MATRIX_VP, UNITY_MATRIX_M)
  18. #endif // UNITY_SHADER_VARIABLES_MATRIX_DEFS_LEGACY_UNITY_INCLUDED