Skip to content

Commit f1ead08

Browse files
Fix HDRP build issues with DOTS_INSTANCING_ON shader variant (#6490)
Co-authored-by: Vincent Breysse <[email protected]>
1 parent 6663034 commit f1ead08

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

com.unity.render-pipelines.high-definition/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5757
- Fixed a warning because of a null texture in the lens flare pass.
5858
- Fixed a nullref when enabling raycount without ray tracing.
5959
- Fixed error thrown when layered lit material has an invalid material type.
60+
- Fixed HDRP build issues with DOTS_INSTANCING_ON shader variant.
6061

6162
## [13.1.2] - 2021-11-05
6263

com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/PickingSpaceTransforms.hlsl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@
1010
#undef SHADEROPTIONS_CAMERA_RELATIVE_RENDERING
1111

1212
// Define the correct matrices
13+
#ifndef UNITY_DOTS_INSTANCING_ENABLED
14+
1315
#undef unity_ObjectToWorld
1416
#undef unity_MatrixPreviousM
15-
#undef unity_MatrixVP
16-
float4x4 unity_MatrixV;
17-
float4x4 unity_MatrixVP;
18-
float4x4 glstate_matrix_projection;
1917

2018
#undef UNITY_MATRIX_M
2119
#define UNITY_MATRIX_M unity_ObjectToWorld
@@ -29,6 +27,13 @@ float4x4 glstate_matrix_projection;
2927
#undef UNITY_PREV_MATRIX_I_M
3028
#define UNITY_PREV_MATRIX_I_M Inverse(unity_MatrixPreviousM)
3129

30+
#endif
31+
32+
#undef unity_MatrixVP
33+
float4x4 unity_MatrixV;
34+
float4x4 unity_MatrixVP;
35+
float4x4 glstate_matrix_projection;
36+
3237
#undef UNITY_MATRIX_V
3338
#define UNITY_MATRIX_V unity_MatrixV
3439

0 commit comments

Comments
 (0)