From d5ebf43e3dfe7e1ac429a84c9d3357e46bc0665f Mon Sep 17 00:00:00 2001 From: Emux Date: Tue, 13 Jun 2017 12:03:12 +0300 Subject: [PATCH] Location shaders: some Mali GPU don't like ternary operators #321 --- vtm/resources/assets/shaders/location_2.glsl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vtm/resources/assets/shaders/location_2.glsl b/vtm/resources/assets/shaders/location_2.glsl index 879d9d32..9118e676 100644 --- a/vtm/resources/assets/shaders/location_2.glsl +++ b/vtm/resources/assets/shaders/location_2.glsl @@ -40,7 +40,9 @@ void main() { // - subtract inner from outer to create the outline // - multiply by viewshed // - add center point - a = max(d, (a - (b + c)) + c) + (u_mode == 0 ? c : 0); + a = max(d, (a - (b + c)) + c); + if (u_mode == 0) + a += c; gl_FragColor = u_color * a; } }