mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Add padding to normal attribute in Compatibility renderer to match the RD renderers
This commit is contained in:
parent
e8d57afaec
commit
a88e519f18
2 changed files with 22 additions and 3 deletions
|
@ -591,7 +591,6 @@ RS::SurfaceData MeshStorage::mesh_get_surface(RID p_mesh, int p_surface) const {
|
|||
sd.vertex_data = RD::get_singleton()->buffer_get_data(s.vertex_buffer);
|
||||
// When using an uncompressed buffer with normals, but without tangents, we have to trim the padding.
|
||||
if (!(s.format & RS::ARRAY_FLAG_COMPRESS_ATTRIBUTES) && (s.format & RS::ARRAY_FORMAT_NORMAL) && !(s.format & RS::ARRAY_FORMAT_TANGENT)) {
|
||||
Vector<uint8_t> new_vertex_data;
|
||||
sd.vertex_data.resize(sd.vertex_data.size() - sizeof(uint16_t) * 2);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue