Search Issue Tracker
By Design
Votes
0
Found in
6000.0.31f1
6000.1.0a8
Issue ID
UUM-91213
Regression
No
Missing #pragma directives warnings appear in Inspector when including .hlsl file in Shader
Reproduction steps:
1. Open the attached project “IN-86995“
2. In the Project Window in the Assets folder, click on the “ShaderIncludedCgProgram.shader“
3. Observe the result in the Inspector Window
Expected result: No warnings are thrown in the Inspector
Actual result: Two warnings appear in the Inspector that say that the CGPROGRAM does not contain #pragma vertex, #pragma fragment or #pragma surface directive. The Shader is excluded from compilation
Reproducible in: 2023.2.18f1, 6000.0.31f1, 6000.1.0a8
Not reproducible in: 2021.3.47f1, 2022.3.54f1, 2023.2.17f1
Reproducible on: macOS 14.6.1 (M1 Pro), Windows 10
Not reproducible on: No other environments tested
Note: The directives that the Inspector says are missing (#pragma vertex, #pragma fragment or #pragma surface) are located in the “ShaderIncludedInCgProgam.hlsl”. This file is included in the CGPROGRAM of the ShaderIncludedInCgProgram.shader
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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
See https://docs.unity3d.com/6000.0/Documentation/Manual/shader-include-directives.html