diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-01 09:55:24 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-05-01 09:55:24 +0200 |
commit | 3ebef6ce7a8dd95f3727e80e0e786b8b0960cced (patch) | |
tree | 2b41b007927f54e1eb594e95d82cf9fde8291dc2 | |
parent | 0e0ef3cd6986002a4213ea9fd1998da1105d1dc8 (diff) | |
parent | e6f55a532ae54241098f6a11cd309dd6ae68f452 (diff) | |
download | redot-engine-3ebef6ce7a8dd95f3727e80e0e786b8b0960cced.tar.gz |
Merge pull request #91372 from clayjohn/RS-blend-shape-tangent
Enable tangents in blend shape format when using normals
-rw-r--r-- | servers/rendering_server.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 48b6632364..60e8f18c19 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -1226,6 +1226,10 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa bsformat |= (1 << j); } } + if (bsformat & RS::ARRAY_FORMAT_NORMAL) { + // We must use tangents if using normals. + bsformat |= RS::ARRAY_FORMAT_TANGENT; + } ERR_FAIL_COND_V_MSG(bsformat != (format & RS::ARRAY_FORMAT_BLEND_SHAPE_MASK), ERR_INVALID_PARAMETER, "Blend shape format must match the main array format for Vertex, Normal and Tangent arrays."); } |