Skip to content

Instantly share code, notes, and snippets.

@derwodaso
Created July 24, 2017 13:36
Show Gist options
  • Save derwodaso/40fd2a1fc8d6157fe476fd029be6d7e0 to your computer and use it in GitHub Desktop.
Save derwodaso/40fd2a1fc8d6157fe476fd029be6d7e0 to your computer and use it in GitHub Desktop.
Shader compiler error when building for OpenGLES30
Shader "Sprites/ShaderBugTest"
{
Properties
{
_ValueB ("A", Range(0, 1)) = 0
_ValueA ("B", Range(0, 1)) = 1
}
SubShader
{
Cull Off
Lighting Off
ZWrite Off
Blend One OneMinusSrcAlpha
Pass
{
CGPROGRAM
#pragma vertex SpriteVert
#pragma fragment SpriteFragHSV
#pragma target 2.0
#include "UnitySprites.cginc"
half _ValueB;
half _ValueA;
fixed4 SpriteFragHSV(v2f IN) : SV_Target
{
half stepB = step(_ValueB, 1);
half stepA = step(1, _ValueA);
return stepA * stepB;
}
ENDCG
}
}
CustomEditor "HueShiftMaterialInspector"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment