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
- Undoing Animator Parameter name change breaks references to it
- Crash on BV4_OverlapBoxAll when moving in play mode
- Custom mesh water surface normal map fades out when Y Position increases
- Sprite renderer does not issue draw calls correctly when using SRP Batcher
- [Android] Flickering artifacts when using "ScriptableRenderer.EnqueuePass(RenderPassEvent.BeforeRenderingPostProcessing)" multiple times
Resolution Note:
See https://docs.unity3d.com/6000.0/Documentation/Manual/shader-include-directives.html