Unrecognized #pragma surface directive: finalGBuffer

hi, i need use finalGBuffer
but unity say Unrecognized #pragma surface directive: finalGBuffer

shader

Shader "Decals/DiffuseSufr" {
   Properties {
     _specular ("Specular", Color) = (0,0,0,0)

     _colorOverride("colorOverride", Float) = 1
     _bumpOverride("bumpOverride", Float) = 1
     _specularOverride("specularOverride", Float) = 1
    
     _BumpMap ("Normalmap", 2D) = "bump" {}
     _BumpScale("BumpScale", Float) = 1
           
     _MainTex ("Diffuse", 2D) = "white" {}
     _opacity("opacity", Float) = 0.5
   }
   SubShader {
  
        Fog { Mode Off } // no fog in g-buffers pass
        ZWrite Off
        Blend 0 SrcAlpha OneMinusSrcAlpha
        Blend 2 SrcAlpha OneMinusSrcAlpha
        Blend 3 SrcAlpha OneMinusSrcAlpha
       
        ColorMask RGB 0
        ColorMask RGB 2
        ColorMask RGB 3
        CGPROGRAM
        #pragma surface surf Standard finalGBuffer:myG
        #pragma target 3.0
       
        struct Input { 
            float2 uv_MainTex;
            float4 screenPos;
            float4 color : COLOR;
        };
       
     
        void surf (Input IN, inout SurfaceOutputStandard o) {

        }
       
        void myG (Input IN, SurfaceOutputStandard  o, inout half4 diffuse, inout half4 specSmoothness, inout half4 normal, inout half4 emission)        {
            diffuse = 0;
        }
        ENDCG
   }
   FallBack "Diffuse"
}

try “finalgbuffer”.

Omg, i’m stupid bitch))
thanks!!

Um I hope this isn’t a stupid question, but where is the documentation that says that’s the signature for the finalgbuffer function? I couldn’t find anything actually specific about it in the Shader Reference

Unfortunately the shader docs aren’t anywhere near as complete as they should be. A lot of shader details you simply have to look for inside of the Unity built-in shaders files, especially the CGINC files included.

1 Like

Yeah :frowning: it’s such a shame, shaders are such an amazing capability we have, and the shader reference has been this way for too many years. @Aras Do you happen to know if Unity will be able to make the shader docs more complete any time in the near future? Or maybe is there a way we can help?