Open yakswa opened 2 years ago
CC @The-O-King @godotengine/rendering
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.
Perhaps it makes sense to pay attention to my problem. Maybe it's all connected?
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. :+1:
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.
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.
This was confirmed on 3.4.4 on Reddit: https://www.reddit.com/r/godot/comments/uznrsi/please_help_incorrect_display_of_materials_on/
Godot version
3.4.2 stable (45eaa2daf)
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 https://github.com/godotengine/godot/blob/45eaa2daf1e3d2571a9f31a3421911262ec82f51/drivers/gles2/rasterizer_storage_gles2.cpp#L3802
And Dev assert fail everytime that code : buffer_size * sizeof(float) https://github.com/godotengine/godot/blob/45eaa2daf1e3d2571a9f31a3421911262ec82f51/drivers/gles2/rasterizer_storage_gles2.cpp#L3972 https://github.com/godotengine/godot/blob/45eaa2daf1e3d2571a9f31a3421911262ec82f51/drivers/gles2/rasterizer_storage_gles2.h#L1396
Steps to reproduce
blend_shapes.tscn.zip
Setting Driver GLES2
Minimal reproduction project
No response