summaryrefslogtreecommitdiff
path: root/drivers/gles3/shaders
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-08 17:23:44 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-08-08 17:23:44 -0300
commitdf573f5c3a76155842e43ea0dbab594e3944b114 (patch)
tree1124403a4f002fd6331f7381b8a4d40999391af6 /drivers/gles3/shaders
parent8a4bce6ebd843f9a8f482f74601f4933aae737a3 (diff)
-Restored Sprite3D to working function, fixes #2061, fixes #9738
-Restored an alpha scissor property in Material
Diffstat (limited to 'drivers/gles3/shaders')
-rw-r--r--drivers/gles3/shaders/scene.glsl10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gles3/shaders/scene.glsl b/drivers/gles3/shaders/scene.glsl
index efb82441f4..3f0498746b 100644
--- a/drivers/gles3/shaders/scene.glsl
+++ b/drivers/gles3/shaders/scene.glsl
@@ -1523,6 +1523,10 @@ void main() {
#endif
+#if defined(ALPHA_SCISSOR_USED)
+ float alpha_scissor = 0.5;
+#endif
+
#if defined(ENABLE_TANGENT_INTERP) || defined(ENABLE_NORMALMAP) || defined(LIGHT_USE_ANISOTROPY)
vec3 binormal = normalize(binormal_interp)*side;
vec3 tangent = normalize(tangent_interp)*side;
@@ -1571,6 +1575,12 @@ FRAGMENT_SHADER_CODE
}
+#if defined(ALPHA_SCISSOR_USED)
+ if (alpha<alpha_scissor) {
+ discard;
+ }
+#endif
+
#if defined(ENABLE_NORMALMAP)