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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
See https://docs.unity3d.com/6000.0/Documentation/Manual/shader-include-directives.html