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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
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;
```