diff options
author | Clay John <claynjohn@gmail.com> | 2022-10-23 17:02:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-23 17:02:04 -0700 |
commit | 4134f2a464a3914520755a8780aebac6cb403f6b (patch) | |
tree | 4d55a7b95fd6696bae6942c3a497378f94a10ca3 /servers/rendering/renderer_rd/shaders | |
parent | 753a182797e28e740c09a0d7c03b94d33946a0f6 (diff) | |
parent | b8031bb7d6d0bed33c058db20b58800e615538e3 (diff) |
Merge pull request #67566 from Sauermann/fix-code-simplifications
Code simplifications
Diffstat (limited to 'servers/rendering/renderer_rd/shaders')
-rw-r--r-- | servers/rendering/renderer_rd/shaders/canvas.glsl | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/servers/rendering/renderer_rd/shaders/canvas.glsl b/servers/rendering/renderer_rd/shaders/canvas.glsl index 4a18c7c052..8593e6b265 100644 --- a/servers/rendering/renderer_rd/shaders/canvas.glsl +++ b/servers/rendering/renderer_rd/shaders/canvas.glsl @@ -655,20 +655,7 @@ void main() { if (i >= light_count) { break; } - uint light_base; - if (i < 8) { - if (i < 4) { - light_base = draw_data.lights[0]; - } else { - light_base = draw_data.lights[1]; - } - } else { - if (i < 12) { - light_base = draw_data.lights[2]; - } else { - light_base = draw_data.lights[3]; - } - } + uint light_base = draw_data.lights[i >> 2]; light_base >>= (i & 3) * 8; light_base &= 0xFF; |