draw_vertex_texture primitives have confusing UV behaviour compared to vertex buffers #2536
Labels
project
This issue has a sample project attached
runner-bug
In-game bugs with the "GameMaker Studio 2" runtimes
Description
Simply put, vertex primitives (i.e. draw_vertex_texture) seem to automatically normalise texture coordinates to the specific texture given instead of the whole texture page (where UV [1,1] is the bottom right corner of the texture rather than the texture page), whereas vertex_buffers operate on the whole texture page.
The former resulting in wrong results when using functions like texture_get_uvs and texture_get_texel_width (the former of which is specifically stated in the manual as being of use for 2D primitive functions).
Perhaps more of an oddity if you just want to draw the entirety of a texture, but if you're trying to draw a section of a texture a whole other approach needs to be taken to get the correct UVs.
The behaviour should either consistent between functions, or the manual is changed to reflect that UVs won't work as expected with such functions and that coordinates will need to be calculated differently. The manual currently, outside of perhaps the argument names, doesn't indicate that there's any difference in how UVs work between the two functions.
Steps To Reproduce
4cfeff9c-9e3b-4650-9e1e-6a1d6db54f52
The text was updated successfully, but these errors were encountered: