#3819·ebiten

vector: atlas packing carries the previous row height into shorter rows

Author: kumagiCreated Oct 1, 2026Updated Oct 1, 2026
Labelsos:linux

Ebitengine Version

main (ab841bf203427e7d8208598f58285b686bcfc45a)

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • OpenBSD
  • Android
  • iOS
  • Nintendo Switch
  • PlayStation 5
  • Xbox
  • Web Browsers

Go Version (paste your go version output)

go version go1.27.1 linux/amd64

What steps will reproduce the problem?

In a vector package test, call atlas.setPaths with a 2048x2048 destination and five rectangular paths: one 2048x1024 rectangle followed by four 2048x16 rectangles. Use each rectangle as its clipping bounds. Check both AntiAlias=false and AntiAlias=true.

What is the expected result?

All five regions fit in one atlas image. Their row Y positions should be 0, 1024, 1040, 1056, and 1072.

What happens instead?

Two atlas images are allocated. The short rows advance by 1024 pixels, retaining the tallest row's height. Their Y positions are 0, 1024, 2048, 3072, and 0 in the second image.

Anything else you feel useful to add?

Reproduced on main ab841bf203 with a focused Go regression test under Xvfb. Regions are already sorted by descending height, so each new row's first region determines its height.