-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Adopt top-left texture origin #3335
Conversation
This change has the potential to break a lot of advanced users projects who render their own textures and use them in shaders. So it won't break any existing projects and ensure a smooth transition, which can be done by the developer by choice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great to me, glad to have this sorted out!
Hi @Maksims , Yes you're right. This change has the potential to impact projects, especially ones that dynamically generate texture coordinates or have custom chunks generating UVs. Fortunately in most cases the fix is simple, place Keeping backwards compatibility would be difficult in the engine (think different chunks etc) and would leave us having to maintain quite a complicated global option. Over time we'd expect to see bugs creep in and ultimately we decided that making a clean break is the best approach here. Also, with this change in place we can finally support new features that weren't possible before (glTF texture transform, glTF quantising, gltf compressed textures). If we were to keep backwards compatibility those features would also be compromised. Along with this change we have also updated the backend to stop flipping compressed textures. When this PR goes live, users will get an alert in the editor saying textures need recompressing. A single click will recompress all textures in the project. This is a big change which might be a little painful, but we are preparing to make the transition hopefully as smooth as possible! |
Fixes: #3322
This PR changes the orientation of textures in the engine from bottom-left to top-left, bringing it inline with WebGL and glTF.
Specifically, the following changes are made:
NOTE: the following shader chunks have been changed in this PR:
particle.frag
particle_cpu.vert
particle_normalMap.frag
startNineSliced.frag
startNiceSlicedTiled.frag
Users who have custom versions of these chunks will have to update these accordingly.