Hello,
I am having trouble using deferred rending with a custom shader (it works with standard shader)
using this shader renders black. I have Deffered set in camera as well as player settings, and anti aliasing is off. what am I doing wrong?
Shader "df/deferredLambert" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf dfDeferred
sampler2D _MainTex;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D (_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb;
o.Alpha = c.a;
}
fixed4 LightingdfDeferred_PrePass (SurfaceOutput s, half4 light)
{
fixed4 c;
c.rgb = s.Albedo * light.rgb;
c.a = s.Alpha;
return c;
}
ENDCG
}
FallBack "Diffuse"
}