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

GLES2.0 blend shape normal vector weird on OCTAHEDRAL_COMPRESSION, DEVASSERT fail every time #58078

Open
Tracked by #63198
yakswa opened this issue Feb 14, 2022 · 6 comments

Comments

@yakswa
Copy link

yakswa commented Feb 14, 2022

Godot version

3.4.2 stable (45eaa2d)

System information

MAC, GLES2.0

Issue description

Blend Shape Normal Vector weird on OCTAHEDRAL_COMPRESSION
maybe Array Normal value/127 in update_dirty_blend_shapes

wr[0] = (((int8_t *)rd)[0] / 127.0) * base_weight;

And
Dev assert fail everytime that code : buffer_size * sizeof(float)

buffer_orphan_and_upload(s->blend_shape_buffer_size, 0, buffer_size * sizeof(float), transform_buffer.read().ptr(), GL_ARRAY_BUFFER, true);

DEV_ASSERT((p_offset + p_data_size) <= p_buffer_size);

Steps to reproduce

blend_shapes.tscn.zip

Setting Driver GLES2

Minimal reproduction project

No response

@akien-mga akien-mga added this to the 3.5 milestone Feb 14, 2022
@akien-mga
Copy link
Member

CC @The-O-King @godotengine/rendering

@lawnjelly
Copy link
Member

lawnjelly commented Feb 14, 2022

buffer_orphan_and_upload(s->blend_shape_buffer_size, 0, buffer_size * sizeof(float), transform_buffer.read().ptr(), GL_ARRAY_BUFFER, true);

I'm immediately wondering what blend_shape_buffer_size unit is, I suspect it may just need the first argument changed to s->blend_shape_buffer_size * 4 to pass the buffer size in bytes. This may have been my mistake a while back thinking that this was in bytes - I'm surprised this has not come up before, but maybe not many people use blend shapes in GLES2, I have a sneaking suspicion it may not be fully supported (know very little about blend shapes).

Not sure about the octahedral side, there may be two bugs here.

EDIT:
Ah turns out there is software blendshape support in GLES2 : #48480 . Am investigating.
Looks like it was added in this PR #51363 , so may have been parulina rather than myself but it's an easy bug to make so is understandable.

@SkanerSoft
Copy link

Perhaps it makes sense to pay attention to my problem. Maybe it's all connected?
#57322

@lawnjelly
Copy link
Member

lawnjelly commented Feb 14, 2022

Perhaps it makes sense to pay attention to my problem. Maybe it's all connected? #57322

Could well be a half float issue if it is Mac only for the octahedral side. 👍
I'll try and fix the other bug though and change that DEV_ASSERT to an ERR_FAIL.

The PR I've added should fix the uploading, as for any octahedral specifics I'll leave that to OKing.

@akien-mga
Copy link
Member

Do you still reproduce the same issue in 3.5 beta 4 or later? There were various fixes to octahedral compression in the past few betas.

@Calinou
Copy link
Member

Calinou commented May 28, 2022

@lawnjelly lawnjelly modified the milestones: 3.5, 3.x Feb 28, 2024
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

5 participants