From d6c5cb7778c984735c0e654591d52b07fdfea6ea Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Fri, 14 May 2021 16:43:44 -0700 Subject: [PATCH] workaround a shader compiler bug on qualcomm h/w --- shaders/src/light_punctual.fs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shaders/src/light_punctual.fs b/shaders/src/light_punctual.fs index 705fb78b84..841213da53 100644 --- a/shaders/src/light_punctual.fs +++ b/shaders/src/light_punctual.fs @@ -79,7 +79,9 @@ uint getLightIndex(const uint index) { uint v = index >> 4u; uint c = (index >> 2u) & 0x3u; uint s = (index & 0x3u) * 8u; - return (froxelRecordUniforms.records[v][c] >> s) & 0xFFu; + // this intermediate is needed to workaround a bug on qualcomm h/w + highp uvec4 d = froxelRecordUniforms.records[v]; + return (d[c] >> s) & 0xFFu; } float getSquareFalloffAttenuation(float distanceSquare, float falloff) {