unity_InstanceID = inputInstanceID + unity_BaseInstanceID;
#endif
}
void UnitySetupCompoundMatrices();
#define DEFAULT_UNITY_SETUP_INSTANCE_ID(input) { UnitySetupInstanceID(UNITY_GET_INSTANCE_ID(input)); UNITY_INSTANCING_PROCEDURAL_FUNC(); UnitySetupCompoundMatrices(); }
#define DEFAULT_UNITY_SETUP_INSTANCE_ID(input) { UnitySetupInstanceID(UNITY_GET_INSTANCE_ID(input)); UNITY_INSTANCING_PROCEDURAL_FUNC();}
#define DEFAULT_UNITY_SETUP_INSTANCE_ID(input) { UnitySetupInstanceID(UNITY_GET_INSTANCE_ID(input)); UnitySetupCompoundMatrices(); }
#define DEFAULT_UNITY_SETUP_INSTANCE_ID(input) { UnitySetupInstanceID(UNITY_GET_INSTANCE_ID(input));}
#endif
#define UNITY_TRANSFER_INSTANCE_ID(input, output) output.instanceID = UNITY_GET_INSTANCE_ID(input)
#else
#if !defined(DYNAMICLIGHTMAP_ON)
#define UNITY_USE_SHCOEFFS_ARRAYS
#endif
#if (SHADERPASS == SHADERPASS_GBUFFER) && defined(SHADOWS_SHADOWMASK)
#if defined(SHADOWS_SHADOWMASK)
#define UNITY_USE_PROBESOCCLUSION_ARRAY
#endif
#endif
#define UNITY_ACCESS_INSTANCED_PROP(arr, var) var
#endif // UNITY_INSTANCING_ENABLED
#if defined(UNITY_INSTANCING_ENABLED) || defined(UNITY_PROCEDURAL_INSTANCING_ENABLED) || defined(UNITY_STEREO_INSTANCING_ENABLED)
// The following matrix evaluations depend on the static var unity_InstanceID & unity_StereoEyeIndex. They need to be initialized after UnitySetupInstanceID.
static float4x4 unity_MatrixMVP_Instanced;
static float4x4 unity_MatrixMV_Instanced;
static float4x4 unity_MatrixTMV_Instanced;
static float4x4 unity_MatrixITMV_Instanced;
void UnitySetupCompoundMatrices()
{
unity_MatrixMVP_Instanced = mul(UNITY_MATRIX_VP, UNITY_MATRIX_M);
unity_MatrixMV_Instanced = mul(UNITY_MATRIX_V, UNITY_MATRIX_M);
unity_MatrixTMV_Instanced = transpose(unity_MatrixMV_Instanced);
unity_MatrixITMV_Instanced = transpose(mul(UNITY_MATRIX_I_M, unity_MatrixInvV));
}
#undef UNITY_MATRIX_MVP
#undef UNITY_MATRIX_MV
#undef UNITY_MATRIX_T_MV
#undef UNITY_MATRIX_IT_MV
#define UNITY_MATRIX_MVP unity_MatrixMVP_Instanced
#define UNITY_MATRIX_MV unity_MatrixMV_Instanced
#define UNITY_MATRIX_T_MV unity_MatrixTMV_Instanced
#define UNITY_MATRIX_IT_MV unity_MatrixITMV_Instanced
#endif
#endif // UNITY_INSTANCING_INCLUDED