-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Rectangle missing flip use case from deprecated shape Quad #11996
Comments
Ah, this is to invert the normals, correct? Should we add this as an option on all of our mesh builders? |
It flipped the texture coordinates horizontally. From https://docs.rs/bevy/latest/bevy/prelude/shape/struct.Quad.html :
|
This was sort of left out on purpose: #11431 (comment) It seems a bit strange to me to support flipping a texture in a mesh representation. I feel like it's something that should instead be configurable at a material-level. I would assume that this is possible already? If not, I think it'd be valuable to have. Only supporting texture flipping for Looking at other applications, I'm also not seeing a similar |
I'm not saying that the flipped method needs to be added to Mesh, as a user of |
Do you mean just add to StandardMaterial additional |
@tripokey For any UV transformations you can use StandardMaterial::uv_transform, which is pretty fresh, because it had been added for KHR_texture_transform support to current main and it will be available from next 0.14 release.
instead of default uv_transform or premultiply it with uv_transform that you wanted to use earlier, if so. |
I think that |
#12917) # Objective Fixes #11996 The deprecated shape Quad's flip field role migrated to StandardMaterial's flip/flipped methods ## Solution flip/flipping methods of StandardMaterial is applicable to any mesh --- ## Changelog - Added flip and flipped methods to the StandardMaterial implementation - Added FLIP_HORIZONTAL, FLIP_VERTICAL, FLIP_X, FLIP_Y, FLIP_Z constants ## Migration Guide Instead of using `Quad::flip` field, call `flipped(true, false)` method on the StandardMaterial instance when adding the mesh. --------- Co-authored-by: BD103 <[email protected]>
What problem does this solve or what need does it fill?
The deprecated shape Quad's flip field does not have a clear migration path to the new Rectangle shape.
Current migration guide: https://bevyengine.org/learn/migration-guides/0-12-to-0-13/#deprecate-shapes-in-bevy-render-mesh-shape
What solution would you like?
#10569 specifies that there should be a flipped method to cover this use case, however that seems to be missing.
The text was updated successfully, but these errors were encountered: