Skip to content

Commit

Permalink
Fix buffer overflow in the item drop shader.
Browse files Browse the repository at this point in the history
should fix #891
  • Loading branch information
IntegratedQuantum committed Jan 4, 2025
1 parent 850956b commit 72796f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions assets/cubyz/shaders/item_drop.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down

0 comments on commit 72796f9

Please sign in to comment.