all-is-cubes icon indicating copy to clipboard operation
all-is-cubes copied to clipboard

Texture allocation or usage glitches

Open kpreid opened this issue 2 years ago • 2 comments

At low framerates (or possibly only on web builds) the Animation demo glitches out and displays the wrong texture on a block. We're supposed to prevent this by keeping texture tile handles alive until the mesh is no longer in use, but evidently that isn't happening.

image

https://github.com/kpreid/all-is-cubes/assets/779501/a1546c0e-32ab-416f-b799-ae9e2af887cb

kpreid avatar Jul 11 '23 03:07 kpreid

Commit 9e723292fe695d633c6a1fc011114efa2d21ba21 adds overwriting deallocated texels; this color does appear for some animation frames, showing that the problem is indeed that meshes are outliving tiles.

kpreid avatar Oct 09 '23 21:10 kpreid

It's also possible to trigger this bug by toggling the transparency option (which currently causes all meshes to be rebuilt).

kpreid avatar Nov 03 '23 16:11 kpreid