From 72796f99059b951d0e4fdf23ae909ef105713fa9 Mon Sep 17 00:00:00 2001 From: IntegratedQuantum Date: Sat, 4 Jan 2025 14:22:00 +0100 Subject: [PATCH] Fix buffer overflow in the item drop shader. should fix #891 --- assets/cubyz/shaders/item_drop.fs | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/cubyz/shaders/item_drop.fs b/assets/cubyz/shaders/item_drop.fs index 6c9177428..5e50e32ad 100644 --- a/assets/cubyz/shaders/item_drop.fs +++ b/assets/cubyz/shaders/item_drop.fs @@ -65,6 +65,7 @@ float ditherThresholds[16] = float[16] ( bool passDitherTest(float alpha) { ivec2 screenPos = ivec2(gl_FragCoord.xy); + screenPos &= 3; return alpha > ditherThresholds[screenPos.x*4 + screenPos.y]; }