odrick/free-tex-packer

Allow for different orientation in rotation

JannikGM opened this issue · 1 comments

When rotating, the image is currently rotated 90 degree clockwise.
It would be nice if the rotation could also mirrored horizontally / vertically; mirroring on both axis would then result in 90 degree counter-clockwise rotation.

Background: Ideally, I'd just like to swap my .xy coordinate for .yx, but this depends on how the coordinate system is set up, so free-tex-packer should allow flags to mirror rotated versions around the vertical, horizontal axis or both. Even better if this was also added to non-rotated versions to cover all the bases.

Depending on the coordinate system used, the current method requires a bunch of code to undo the orientation in my GLSL shaders, I believe I currently have to do vec2(height-y, x) but then we also get a whole lot of drama about implementing texture wrap modes, pixel centers etc. I'd prefer if I could use coord.xy for non-rotated and coord.yx for rotated textures.

(Specifically, I need this in the CLI version, but I assume this issue tracker goes for both)

90 degree clockwise rotation in atlases is a standard for now.