Tomb-Editor icon indicating copy to clipboard operation
Tomb-Editor copied to clipboard

TE: Textures are not properly packed for TEN compiler

Open Lwmte opened this issue 2 years ago • 0 comments

It seems that internally TE compiles TEN textures not into single 4K atlas, but into "pseudo-pages" of old 256x256 size. It is easily seen here:

room_page_0

It causes several problems. First off, textures are not packed efficiently. Second, since padding isn't properly managed (it was written with an idea that at old page borders, DirectX naturally clamps unpadded texture edges), sometimes one, two or all 4 sides of texture (in case if builder uses full 256x256 textures on room faces) may end up on the edge of "pseudo-page" and bleed into adjacent "pseudo-page".

Solution: make TEN texture packer to natively use 4096x4096 page size, and not divide atlas internally into 256x256 splits.

Lwmte avatar May 27 '22 18:05 Lwmte