Hi,
I’m making a shader that adds BDRF to diffuse. It’s working fine with directional lights, but if I add a point light you can see a clean cut on the lighting as you can see on the screenshot:
and here is the light model I use:
inline fixed4 LightingADDBRDF ( SurfaceOutput s, fixed3 lightDir, fixed3 viewDir, fixed atten){
half difLight = max (0, dot( s.Normal, lightDir)) * 0.5 + 0.5;
half rimLight = max (0,dot(s.Normal,viewDir));
fixed3 BRDF = tex2D(_BRDF, float2(difLight,rimLight)).rgb;
fixed4 col;
col.rgb = ( s.Albedo * _LightColor0.rgb * difLight * atten * 2) + BRDF;
col.a = s.Alpha;
return col;
}
if I disable BRDF the lighting is fine, is there a way to make it smooth with BRDF ?
Thanks
