Skip to content
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

Skeleton2D wrong deformations with multiple instances #25911

Closed
mrcdk opened this issue Feb 15, 2019 · 3 comments
Closed

Skeleton2D wrong deformations with multiple instances #25911

mrcdk opened this issue Feb 15, 2019 · 3 comments

Comments

@mrcdk
Copy link
Contributor

mrcdk commented Feb 15, 2019

Godot version:

Godot 3.1 master 89eb79a

OS/device including version:

Windows 10

Issue description:

When using multiple instances of a Skeleton2D animation the deformations are wrong.

https://streamable.com/noqcz

Minimal reproduction project:

godot_animation_test.zip

Credits:

@reduz reduz self-assigned this Feb 15, 2019
@akien-mga akien-mga added this to the 3.1 milestone Feb 15, 2019
@akien-mga
Copy link
Member

Might be related to #25204.

@mrcdk
Copy link
Contributor Author

mrcdk commented Feb 16, 2019

A couple of observations:

  • If one of the instances isn't visible the animation looks okay. The moment you make that invisiblenode visible the one at the bottom of the tree will show wrong deformations.
  • Making one of them local to the scene (aka, removing the instancing) still shows the issue.
  • If there's a sprite between instances the issue WON'T happen. I guess anything that draws will work but I haven't tested it.

Video: https://streamable.com/rvpsj

EDIT: Just tested GLES2. GLES2 doesn't have this issue. It works correctly. Only GLES3 seems to show the problem.

@mrcdk
Copy link
Contributor Author

mrcdk commented Feb 16, 2019

Okay, I think I've found the issue. In RasterizerCanvasGLES3::_set_texture_rect_mode() this line https://github.com/godotengine/godot/blob/master/drivers/gles3/rasterizer_canvas_gles3.cpp#L291 will return true the second time because the first time the p_enable was false so it won't setup everything else the second skeleton needs (or the third, forth,...) I commented it out and it fixed the problem but I don't know if that's the correct way or not. @reduz will know 😅

Look at all those animes animating in sync without issues

https://i.imgur.com/ldyYSJJ.gifv

No more alien animes in my gametest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants