diff options
author | clayjohn <claynjohn@gmail.com> | 2024-04-30 12:14:49 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2024-04-30 12:14:49 -0700 |
commit | e6f55a532ae54241098f6a11cd309dd6ae68f452 (patch) | |
tree | a329fc6f2f8c586f467efff475e63e1e457d8556 /servers/rendering_server.cpp | |
parent | 89850d553eeb259e208d0c577cd7bc1eabd3a90a (diff) | |
download | redot-engine-e6f55a532ae54241098f6a11cd309dd6ae68f452.tar.gz |
Enable tangents in blend shape format when using normals
Diffstat (limited to 'servers/rendering_server.cpp')
-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 bbe6b1ad0d..47992db51f 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."); } |