I have this fairly simple shader:
Shader "Custom/Moon"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_BumpMap("Normal (RGB)", 2D) = "bump" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200
Blend OneMinusDstColor One
CGPROGRAM
#pragma surface surf Standard
#pragma target 3.0
sampler2D _MainTex;
sampler2D _BumpMap;
struct Input
{
float2 uv_MainTex;
};
fixed4 _Color;
void surf (Input IN, inout SurfaceOutputStandard o)
{
fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;
o.Metallic = 0;
o.Smoothness = 0;
o.Occlusion = 0;
o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_MainTex));
}
ENDCG
}
FallBack "Diffuse"
}
It works correctly in the scene view, but in game view it renders as if “Blend OneMinusDstColor One” isn’t there, and it somehow flickers (as if the light increases intensity at times)
Any ideas why?