UPDATE: I mentioned that I had shader code for the shader that I am using which is causing rendering issues with the Light Probes… here is the code. Maybe someone can modify it to allow it to work with the light probes.
Shader "NeptuneImaging/NI_Supershader"
{
Properties
{
_FrontDiffuse("Front Diffuse Map", 2D) = "gray" {}
_BackDiffuse("Back Diffuse Map", 2D) = "gray" {}
_FrontNormalmap("Front Normal Map", 2D) = "gray" {}
_BackNormalMap("Back Normal Map", 2D) = "gray" {}
_FrontGlossMap("Front Gloss Map (A) Reflect", 2D) = "white" {}
_FrontGlossStrength("_FrontGlossStrength", Float) = 0
_FrontSpecPower("Front Specular Power", 2D) = "white" {}
_FrontHightlightStrength("_FrontHightlightStrength", Float) = 0
_BackGlossMap("Back Gloss Map", 2D) = "white" {}
_BackGlossStrength("_BackGlossStrength", Float) = 0
_BackSpecPower("Back Specular Power", 2D) = "white" {}
_BackHighlightStrength("_BackHighlightStrength", Float) = 0
_AdditiveGloss("Additive Masking", 2D) = "black" {}
_FrontAdditiveSpread("_FrontAdditiveSpread", Float) = 0
_FrontAdditiveStrength("_FrontAdditiveStrength", Float) = 0
_BackAdditiveSpread("_BackAdditiveSpread", Float) = 0
_BackAdditiveStrength("_BackAdditiveStrength", Float) = 0
_EmissionColour("_EmissionColour", 2D) = "black" {}
_EmissionStrength("_EmissionStrength", Float) = 0
_ClipMap("_ClipMap", 2D) = "white" {}
_ReflectionStrength("_ReflectionStrength", Float) = 0
_Cubemap("_Cubemap", Cube) = "black" {}
}
SubShader
{
Tags
{
"Queue"="Transparent-100"
"IgnoreProjector"="False"
"RenderType"="Opaque"
}
Cull Off
ZWrite On
ZTest LEqual
ColorMask RGBA
Fog{
}
CGPROGRAM
#pragma surface surf BlinnPhongEditor vertex:vert
#pragma target 3.0
sampler2D _FrontDiffuse;
sampler2D _BackDiffuse;
sampler2D _FrontNormalmap;
sampler2D _BackNormalMap;
sampler2D _FrontGlossMap;
float _FrontGlossStrength;
sampler2D _FrontSpecPower;
float _FrontHightlightStrength;
sampler2D _BackGlossMap;
float _BackGlossStrength;
sampler2D _BackSpecPower;
float _BackHighlightStrength;
sampler2D _AdditiveGloss;
float _FrontAdditiveSpread;
float _FrontAdditiveStrength;
float _BackAdditiveSpread;
float _BackAdditiveStrength;
sampler2D _EmissionColour;
float _EmissionStrength;
sampler2D _ClipMap;
float _ReflectionStrength;
samplerCUBE _Cubemap;
struct EditorSurfaceOutput {
half3 Albedo;
half3 Normal;
half3 Emission;
half3 Gloss;
half Specular;
half Alpha;
half4 Custom;
};
inline half4 LightingBlinnPhongEditor_PrePass (EditorSurfaceOutput s, half4 light)
{
half3 spec = light.a * s.Gloss;
half4 c;
c.rgb = (s.Albedo * light.rgb + light.rgb * spec);
c.a = s.Alpha;
return c;
}
inline half4 LightingBlinnPhongEditor (EditorSurfaceOutput s, half3 lightDir, half3 viewDir, half atten)
{
half3 h = normalize (lightDir + viewDir);
half diff = max (0, dot ( lightDir, s.Normal ));
float nh = max (0, dot (s.Normal, h));
float spec = pow (nh, s.Specular*128.0);
half4 res;
res.rgb = _LightColor0.rgb * diff;
res.w = spec * Luminance (_LightColor0.rgb);
res *= atten * 2.0;
return LightingBlinnPhongEditor_PrePass( s, res );
}
struct Input {
float4 meshUV;
float3 viewDir;
float3 worldRefl;
INTERNAL_DATA
};
void vert (inout appdata_full v, out Input o) {
float4 VertexOutputMaster0_0_NoInput = float4(0,0,0,0);
float4 VertexOutputMaster0_1_NoInput = float4(0,0,0,0);
float4 VertexOutputMaster0_2_NoInput = float4(0,0,0,0);
float4 VertexOutputMaster0_3_NoInput = float4(0,0,0,0);
o.meshUV.xy = v.texcoord.xy;
o.meshUV.zw = v.texcoord1.xy;
}
void surf (Input IN, inout EditorSurfaceOutput o) {
o.Normal = float3(0.0,0.0,1.0);
o.Alpha = 1.0;
o.Albedo = 0.0;
o.Emission = 0.0;
o.Gloss = 0.0;
o.Specular = 0.0;
o.Custom = 0.0;
float4 Tex2D0=tex2D(_FrontDiffuse,(IN.meshUV.xyxy).xy);
float4 Tex2D1=tex2D(_BackDiffuse,(IN.meshUV.xyxy).xy);
float4 Step0=step(float4( IN.viewDir.x, IN.viewDir.y,IN.viewDir.z,1.0 ),float4( 0.0, 0.0, 0.0, 0.0 ));
float4 Split0=Step0;
float4 Lerp0=lerp(Tex2D0,Tex2D1,float4( Split0.z, Split0.z, Split0.z, Split0.z));
float4 Multiply12=float4( 1,1,1,1 ) * Lerp0;
float4 Sign0=sign(float4( IN.viewDir.x, IN.viewDir.y,IN.viewDir.z,1.0 ));
float4 Assemble0_0_NoInput = float4(0,0,0,0);
float4 Assemble0_1_NoInput = float4(0,0,0,0);
float4 Assemble0_3_NoInput = float4(0,0,0,0);
float4 Assemble0=float4(Assemble0_0_NoInput.x, Assemble0_1_NoInput.y, Sign0.z, Assemble0_3_NoInput.w);
float4 Tex2DNormal0=float4(UnpackNormal( tex2D(_FrontNormalmap,(IN.meshUV.xyxy).xy)).xyz, 1.0 );
float4 Multiply10=Tex2DNormal0 * float4( 2.5,2.5,1,1);
float4 Tex2DNormal1=float4(UnpackNormal( tex2D(_BackNormalMap,(IN.meshUV.xyxy).xy)).xyz, 1.0 );
float4 Multiply8=Tex2DNormal1 * float4( 2.5,2.5,-1,1);
float4 Step3=step(float4( IN.viewDir.x, IN.viewDir.y,IN.viewDir.z,1.0 ),float4( 0.0, 0.0, 0.0, 0.0 ));
float4 Split3=Step3;
float4 Lerp4=lerp(Multiply10,Multiply8,float4( Split3.z, Split3.z, Split3.z, Split3.z));
float4 Add8=Assemble0 + Lerp4;
float4 WorldReflection0=float4( WorldReflectionVector (IN, Add8), 1.0);
float4 TexCUBE0=texCUBE(_Cubemap,WorldReflection0);
float4 Multiply14=_ReflectionStrength.xxxx * TexCUBE0;
float4 Tex2D9=tex2D(_FrontGlossMap,(IN.meshUV.xyxy).xy);
float4 Add10_1_NoInput = float4(0,0,0,0);
float4 Add10=Tex2D9.aaaa + Add10_1_NoInput;
float4 Multiply13=Multiply14 * Add10;
float4 Add9=Multiply12 + Multiply13;
float4 Tex2D11=tex2D(_EmissionColour,(IN.meshUV.xyxy).xy);
float4 Multiply11=Tex2D11 * _EmissionStrength.xxxx;
float4 Add11_1_NoInput = float4(0,0,0,0);
float4 Add11=Multiply11 + Add11_1_NoInput;
float4 Tex2D5=tex2D(_FrontSpecPower,(IN.meshUV.xyxy).xy);
float4 Add2_1_NoInput = float4(0,0,0,0);
float4 Add2=Tex2D5 + Add2_1_NoInput;
float4 Tex2D4=tex2D(_AdditiveGloss,(IN.meshUV.xyxy).xy);
float4 Multiply3=Tex2D4 * _FrontAdditiveSpread.xxxx;
float4 Add3=_FrontHightlightStrength.xxxx + Multiply3;
float4 Multiply2=Add2 * Add3;
float4 Tex2D2=tex2D(_BackSpecPower,(IN.meshUV.xyxy).xy);
float4 Add1_1_NoInput = float4(0,0,0,0);
float4 Add1=Tex2D2 + Add1_1_NoInput;
float4 Tex2D3=tex2D(_AdditiveGloss,(IN.meshUV.xyxy).xy);
float4 Multiply1=Tex2D3 * _BackAdditiveSpread.xxxx;
float4 Add0=_BackHighlightStrength.xxxx + Multiply1;
float4 Multiply0=Add1 * Add0;
float4 Step1=step(float4( IN.viewDir.x, IN.viewDir.y,IN.viewDir.z,1.0 ),float4( 0.0, 0.0, 0.0, 0.0 ));
float4 Split1=Step1;
float4 Lerp2=lerp(Multiply2,Multiply0,float4( Split1.z, Split1.z, Split1.z, Split1.z));
float4 Add6_1_NoInput = float4(0,0,0,0);
float4 Add6=Tex2D9 + Add6_1_NoInput;
float4 Tex2D8=tex2D(_AdditiveGloss,(IN.meshUV.xyxy).xy);
float4 Multiply7=Tex2D8 * _FrontAdditiveStrength.xxxx;
float4 Add4=Multiply7 + _FrontGlossStrength.xxxx;
float4 Multiply4=Add6 * Add4;
float4 Tex2D7=tex2D(_BackGlossMap,(IN.meshUV.xyxy).xy);
float4 Add7_1_NoInput = float4(0,0,0,0);
float4 Add7=Tex2D7 + Add7_1_NoInput;
float4 Tex2D6=tex2D(_AdditiveGloss,(IN.meshUV.xyxy).xy);
float4 Multiply6=Tex2D6 * _BackAdditiveStrength.xxxx;
float4 Add5=_BackGlossStrength.xxxx + Multiply6;
float4 Multiply5=Add7 * Add5;
float4 Step2=step(float4( IN.viewDir.x, IN.viewDir.y,IN.viewDir.z,1.0 ),float4( 0.0, 0.0, 0.0, 0.0 ));
float4 Split2=Step2;
float4 Lerp3=lerp(Multiply4,Multiply5,float4( Split2.z, Split2.z, Split2.z, Split2.z));
float4 Tex2D10=tex2D(_ClipMap,(IN.meshUV.xyxy).xy);
float4 Subtract0=Tex2D10.aaaa - float4( 0.5,0.5,0.5,0.5 );
float4 Master0_5_NoInput = float4(1,1,1,1);
float4 Master0_7_NoInput = float4(0,0,0,0);
clip( Subtract0 );
o.Albedo = Add9;
o.Normal = Add8;
o.Emission = Add11;
o.Specular = Lerp2;
o.Gloss = Lerp3;
o.Normal = normalize(o.Normal);
}
ENDCG
}
Fallback "Diffuse"
}