Add padding to normal attribute in Compatibility renderer to match the RD renderers

This commit is contained in:
clayjohn 2023-10-24 22:32:34 +02:00
parent e8d57afaec
commit a88e519f18
2 changed files with 22 additions and 3 deletions

View file

@ -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);
}
}