Search Issue Tracker
Shader cannot find 'frag_surf' and 'vert_surf' and throws errors in the console and Inspector
1. Download user's project and open in Unity
2. Select "InstancedAngelFishShader" shader in Assets
3. In Inspector tab property "Compiled code" only check D3D11
4. Press "Compile and show code"
Expected: no errors in the console or inspector
Actual: errors appear in the console or inspector
Reproduced on: 5.6.4f1; 5.6.5p3; 2017.1.3p2; 2017.2.2p2; 2017.3.2f1; 2017.4.0f1; 2018.1.0b12; 2018.2.0a5
Note: error messages -
1) "Shader error in 'NightBox/Fauna/Angel Fish (Cull Off, Cutout, Instanced)': Did not find shader kernel 'frag_surf' to compile (on d3d11)
Compiling Fragment program with DIRECTIONAL DIRLIGHTMAP_COMBINED DYNAMICLIGHTMAP_ON DIRLIGHTMAP_SEPARATE
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING"
(and once more for 'vert_surf')
2) "Shader error in 'NightBox/Fauna/Angel Fish (Cull Off, Cutout, Instanced)': Fragment program 'frag_surf': Unrecognized sampler 'samplerunity_lightmap' - does not match any texture and is not a recognized inline name (should contain filter and wrap modes).
Compiling Fragment program with DIRECTIONAL LIGHTMAP_ON SHADOWS_SHADOWMASK
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION"
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Search Picker] Undoing selection in unity while the picker is opens doesn't close the picker
- [Android] APP becomes unresponsive and crashes with ANR errors
- Replace no longer replaces when using incremental pipeline
- [LightProbes] Individual light probe gizmos are no longer visible
- [iOS] Canvas does not change when enabled in OnApplicationFocus/OnApplicationPause events