[21.2] Fix previous matrix shader compilation errors with Hybrid Renderer #5691
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
Fixes previous matrix shader compilation errors with hybrid renderer. Hybrid renderer tests with SRP have been disabled for 2021 because hybrid renderer did not support 2021 Unity versions. So it seems that someone broke our code without noticing, since part of the CI was disabled.
The main issues were that :
unity_MatrixPreviousM
andunity_MatrixPreviousMI
were redefined, which caused issues when expanding the (recently added) macrosUNITY_PREV_MATRIX_M
andUNITY_PREV_MATRIX_I_M
. Those were added on July the 28th as part of this PR https://github.com/Unity-Technologies/Graphics/pull/4190/filesTesting status
Validated normal GameObjects code by testing a few scenes in
TestProjects/HDRP_Tests
andTestProjects/UniversalGraphicsTest_Lighting
Could not test with DOTS directly since there is no editor compatible with DOTS + SRP 12. I could only manually test the changes on our development branch for HRNext, which is based on 2022.1 + SRP 13.
Changelog
com.unity.render-pipelines.high-definition
Fixed : Shader compilation errors in the
DOTS_INSTANCING_ON
variantscom.unity.render-pipelines.universal
Fixed : Shader compilation errors in the
DOTS_INSTANCING_ON
variants