Describe the bug
Toon shader has a compiler error on HDRP with 2023.2 and above.
Observed on 2023.2.0f1, 2023.2.20f1, 6000.0.5f1
To Reproduce
Steps to reproduce the behavior:
Install com.unity.toonshader on any release version of 2023.2 or 6000.0
Expected behavior
No shader compiler errors.
Screenshots
Shader error in 'Toon': invalid subscript 'splineVisibility' at com.unity.toonshader/Runtime/HDRP/Shaders/ShaderPassForwardUTS.hlsl(224) (on d3d11)
Shader error in 'Toon(Tessellation)': invalid subscript 'splineVisibility' at com.unity.toonshader/Runtime/HDRP/Shaders/ShaderPassForwardUTS.hlsl(224) (on d3d11)
Desktop (please complete the following information):
OS: Windows 11 23H2 (22631.3737)
Additional context
Shader sets LightLoopContext.splineVisibility to prevent errors about incomplete initialization, but this member was removed in a 2023.2 alpha release. The member is present in the last 2023.1 release (2023.1.20f1) and is no longer present starting with 2023.2.0f1.
This can be fixed by adjusting the preprocessor condition:
Version.hlsl in SRP Core states its numbering system using VERSION_GREATER_EQUAL and such is deprecated for SRP packages that are paired as core packages with Editor versions, as is the case for 2021.2, and to use UNITY_VERSION instead, so this change does so. Please note, the format of UNITY_VERSION changes in Unity 6.
Describe the bug Toon shader has a compiler error on HDRP with 2023.2 and above. Observed on 2023.2.0f1, 2023.2.20f1, 6000.0.5f1
To Reproduce Steps to reproduce the behavior: Install com.unity.toonshader on any release version of 2023.2 or 6000.0
Expected behavior No shader compiler errors.
Screenshots
Desktop (please complete the following information):
Additional context Shader sets
LightLoopContext.splineVisibility
to prevent errors about incomplete initialization, but this member was removed in a 2023.2 alpha release. The member is present in the last 2023.1 release (2023.1.20f1) and is no longer present starting with 2023.2.0f1.This can be fixed by adjusting the preprocessor condition:
(commit here)
Version.hlsl in SRP Core states its numbering system using
VERSION_GREATER_EQUAL
and such is deprecated for SRP packages that are paired as core packages with Editor versions, as is the case for 2021.2, and to useUNITY_VERSION
instead, so this change does so. Please note, the format of UNITY_VERSION changes in Unity 6.