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