Search Issue Tracker

Fixed in 5.3.0

Votes

0

Found in

5.1.1p3

Issue ID

710863

Regression

No

[ShaderCompiler] Line is not compiled if TAB is used instead of space in #pragma statements

Shaders

-

Steps to reproduce:

1. Open the attached project
2. Reimport the DepthWriter shader located in Assets/MappingTest folder to force it to recompile
3. Notice the warning: 'Shader warning in 'Custom/DepthWriter': Both vertex and fragment programs must be present in a CGPROGRAM. Excluding it from compilation. at line 19 (on )'
4. Open the shader code and delete the TAB between '#Pragma' and 'fragment' on line 21 and replace it with space
5. Save the shader. Notice it gets compiled without warnings
6. If you replace space in line 20 or 21 with TAB, it will throw warning again.

Note: In a case like this, where TAB happens to be the same size as space, it would be really hard to figure out what causes the problem.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.