From 666460448d1192512ab11da2f6ab3318d17d1f3b Mon Sep 17 00:00:00 2001 From: mandryskowski Date: Sat, 12 Aug 2023 13:21:27 +0200 Subject: [PATCH] Clarify the behaviour of CSGMesh3D using ArrayMesh (cherry picked from commit 378f835a9c0a5502819693ec3453ab64a3c3e320) --- modules/csg/doc_classes/CSGMesh3D.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/csg/doc_classes/CSGMesh3D.xml b/modules/csg/doc_classes/CSGMesh3D.xml index 9d409e442da..3b16f5cb72a 100644 --- a/modules/csg/doc_classes/CSGMesh3D.xml +++ b/modules/csg/doc_classes/CSGMesh3D.xml @@ -16,7 +16,8 @@ The [Mesh] resource to use as a CSG shape. - [b]Note:[/b] When using an [ArrayMesh], avoid meshes with vertex normals unless a flat shader is required. By default, CSGMesh will ignore the mesh's vertex normals and use a smooth shader calculated using the faces' normals. If a flat shader is required, ensure that all faces' vertex normals are parallel. + [b]Note:[/b] When using an [ArrayMesh], all vertex attributes except [constant Mesh.ARRAY_VERTEX], [constant Mesh.ARRAY_NORMAL] and [constant Mesh.ARRAY_TEX_UV] are left unused. Only [constant Mesh.ARRAY_VERTEX] and [constant Mesh.ARRAY_TEX_UV] will be passed to the GPU. + [constant Mesh.ARRAY_NORMAL] is only used to determine which faces require the use of flat shading. By default, CSGMesh will ignore the mesh's vertex normals, recalculate them for each vertex and use a smooth shader. If a flat shader is required for a face, ensure that all vertex normals of the face are approximately equal.