When an image fails to load (ie: no file) all subsequent object vertices change order.
This makes it impossible to use vertex shaders that rely on vertex order.
Normal: [tl, bl, tr, br]
Broken: [br, tl, bl, tr]
Run example to see the expected behavior (a red square rotated left)
Un-comment bad_img to see the vertices change order
Leaving bad_img visible, un-comment a fix to see its results
Successfully adding another object appears to fix the broken ordering.
It seems something isn't getting cleaned up after a failed load.
layout.nut
// local bad_img = fe.add_image("bad_name.png");
// local fix1 = fe.add_artwork("snap", 0, 0, 50, 50);
// local fix2 = fe.add_text("Maybe", 0, 0, 400, 50); // AM, not AM+
// local fix3 = fe.add_text("LongerText", 0, 0, 400, 50);
local img = fe.add_artwork("snap", 50, 50, 400, 400);
img.shader = fe.add_shader(Shader.VertexAndFragment, "shader.vert", "shader.frag");
When an image fails to load (ie: no file) all subsequent object vertices change order. This makes it impossible to use vertex shaders that rely on vertex order.
Normal: [tl, bl, tr, br] Broken: [br, tl, bl, tr]
bad_img
to see the vertices change orderbad_img
visible, un-comment afix
to see its resultsSuccessfully adding another object appears to fix the broken ordering. It seems something isn't getting cleaned up after a failed load.
layout.nut
shader.frag
shader.vert
Attract-Mode Plus v3.0.8, Attract-Mode v2.7.0