Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.4
2019.4
2019.4.11f1
2020.1
2020.2
Issue ID
1280036
Regression
No
The return fixed4 statement causes an internal compiler error when one of the fixed4 parameters is a previously defined variable
How to reproduce:
1. Create a new 3D Template project
2. Import the attached shader named "TestShader"
3. Select the shader and observe the Inspector window
Expected result: Shader is compiled
Actual result: Shader compilation error is thrown
Reproducible with: 2018.4.27f1, 2019.4.12f1, 2020.1.8f1, 2020.2.0b5
Notes:
1. The predefined variable changes its value in a for loop before being returned. If this loop is removed, the issue does not occur
2. Graphics APIs tested - D3D11, D3D12, Vulkan, OpenGLCore
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- VFX Graph Memory leak when calling the ClearPropertyBinders and AddRemoveVFXProperty
- Entering "Configure Avatar" inside the Inspector locks it
- [Render Graph Viewer] Resource list icons cropped and in inconsistent positions
- Scene View with Debug Draw Mode enabled is gray when GPU Resident Drawer is enabled
- The UI is not visible when resizing out of focus built Player window with Application.runInBackground set to false
Resolution Note (2021.1.X):
Unfortunately, we cannot fix this crash.
Equivalent code of the first loop that makes the crash go away:
for (int i = 0; i < 2; ++i)
{
float xAlpha = xAlphas[ix];
if (xAlpha <= 1)
++ix;
alphas[nRegions - 1] = 1;
++nRegions;
}