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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
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;
```