-
-
Notifications
You must be signed in to change notification settings - Fork 20.9k
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
[WIP] Add negative blend shape weight support -1 and 1 values seem to work. #43445
[WIP] Add negative blend shape weight support -1 and 1 values seem to work. #43445
Conversation
@@ -4463,8 +4463,9 @@ void RasterizerStorageGLES3::mesh_render_blend_shapes(Surface *s, const float *p | |||
for (int ti = 0; ti < mtc; ti++) { | |||
float weight = p_weights[ti]; | |||
|
|||
if (weight < 0.00001) //not bother with this one | |||
if (weight <= 0.00001 && weight >= -0.00001) { |
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.
This order is more natural to read:
if (weight <= 0.00001 && weight >= -0.00001) { | |
if (weight >= -0.00001 && weight <= 0.00001) { |
Also, shouldn't we use is_zero_approx()
here?
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.
Such timing XD #43445 (comment)
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.
hmm, let me check because I think this relates more to the steps in the editor rather than that check.
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.
Nope, it's the editor steps, not the is equal to zero. Still might work but the context is slightly different, I'll test both.
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.
is_zero_approx visual artefacts
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.
Hmm, now I'm getting some minor flickering on unrelated vertexes seems this check is kinda flaky even with either is_zero_approx or with the change above.
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.
OK so rebooting fixed my artefacts and reimporting worked. I think this change will need to be tested a bit more.
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.
I have a driver problem with blend shapes on 3.2 and mesa-git I am testing on OSX now....
forgot to say change is not required for 4.0 as I don't think since no blend shape support works yet. |
Can you prepare a 4.0 patch just in case? It can be modified later, but you still remember the code. |
Superseded by #45837. |
Improves the range available for blend shape weights as per #36707 we needed this for our own games it basically means you can use less blend shape tracks to do the same thing as the opposing blend direction which before needed you to duplicate blend shapes.
👍 🍰