Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2020.3.31f1
2021.3
2022.1
2022.2
Issue ID
1415608
Regression
No
No error or warning thrown when compiling a shader with a comma instead of a period in code
Reproduction steps:
1. Open the attached project "1415608.zip"
2. Open "SampleScene"
3. Edit line 43 of NewSurfaceShader.shader to "fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color,gbra;" and save the change
4. Return to Unity
Expected result: An error or a warning is thrown and the cube changes color to white
Actual result: Shader compiles and the cube changes color to red
Reproducible with: 2019.4.38f1, 2020.3.34f1, 2021.3.1f1, 2022.1.0f1, 2022.2.0a11
Note: Not reproducible with the following symbols: ; / ' * : -
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2022.2.X):
This is legal hlsl syntax. The ',' operator can be used to separate multiple expressions (https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-operators#comma-operator). In this case, this is effectively the same as saying
```
fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
fixed4 gbra;
```