hi, im trying to create a reflective shader that won’t be affected by the alpha channel, meaning, it would react the same on the whole model…im having some difficulties in mixing some of the basic unity shaders to create that effect…
heres what i got so far:
Shader "Custom/ReflectiveTeam" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_BumpMap ("Bumpmap", 2D) = "bump" {}
_Cube ("Cubemap", CUBE) = "" {}
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Lambert
sampler2D _MainTex;
sampler2D _BumpMap;
samplerCUBE _Cube;
struct Input {
float2 uv_MainTex;
float2 uv_BumpMap;
float3 worldRefl;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D (_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb;
o.Alpha = c.a;
o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_BumpMap));
o.Emission = texCUBE (_Cube, IN.worldRefl).rgb;
}
ENDCG
}
FallBack "Diffuse"
}
i just get tons of errors about missing stuff and things that are compiled for directx11 and so on…
can anyone help me a bit?