hi!
i need shadows in forward rendering.
so i added “fullforwardshadows” to the normal-BumpedSpec shader. but i get some errors.
Shader error in 'Forw_shad': Program 'frag_surf', Maximum texture indirection of 4 exceeded; 5 indirections needed to compile program at line 11
Shader warning in 'Forw_shad': Program 'frag_surf', implicit cast from "float3" to "float2" at line 52
Shader warning in 'Forw_shad': Program 'frag_surf', implicit cast from "float3" to "float2" at line 53
Shader warning in 'Forw_shad': Program 'frag_surf', implicit cast from "float3" to "float2" at line 54
Shader warning in 'Forw_shad': Program 'frag_surf', implicit cast from "float3" to "float2" at line 55
the shader:
Shader "Forw_shad" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
_BumpMap ("Normalmap", 2D) = "bump" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 300
CGPROGRAM
#pragma surface surf Lambert fullforwardshadows
sampler2D _MainTex;
sampler2D _BumpMap;
fixed4 _Color;
struct Input {
float2 uv_MainTex;
float2 uv_BumpMap;
};
void surf (Input IN, inout SurfaceOutput o) {
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Alpha = c.a;
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap));
}
ENDCG
}
FallBack "Diffuse"
}
ty!