Created
July 24, 2017 13:36
-
-
Save derwodaso/40fd2a1fc8d6157fe476fd029be6d7e0 to your computer and use it in GitHub Desktop.
Shader compiler error when building for OpenGLES30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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