I have a simple shader that worked fine on Unity 4 but now fails to compile in Unity 5, in Linux only.
A user said they were able to make it work by creating an Nvidia Application Profile and setting
GLIgnoreGLSLExtReqs=true. When they do this, there is no problem.
I’m a bit stumped, can anyone help? Why doesn’t the shader compile on Linux?
Shader copied below. Thanks in advance.
Shader "Custom/Rain overlay"
{
Properties
{
_Color ("Lerping color", Color) = (1,1,1)
_TuningColor ("Tuning color", Color) = (1,1,1)
_MainTex ("Overlay texture", 2D) = ""
_MainTex2 ("Overlay texture 2", 2D) = ""
}
SubShader
{
Tags
{
"RenderType"="Transparent"
"Queue"="Transparent+201" //After lighting overlay and weather overlay double
"IgnoreProjector"="True"
}
Lighting Off
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
//Do not render indoors
//Check for the first bit (the indoor mask) of the stencil being set
//Note that this must render BEFORE sunshadows otherwise they will set the indoors bit
Stencil
{
Ref 1
ReadMask 1
Comp NotEqual
Pass Keep
}
SetTexture [_MainTex]
{
combine texture
}
SetTexture [_MainTex2]
{
combine previous + texture
}
SetTexture [_]
{
constantColor [_TuningColor]
Combine previous * constant
}
SetTexture [_]
{
constantColor [_Color]
Combine previous * constant DOUBLE
}
}
}
}