From d339388942db56212e5513f6f13f4ffd47f9a79b Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 1 Oct 2021 17:20:25 +0200 Subject: [PATCH] Document SurfaceTool must generate tangents for proper normal display --- doc/classes/SurfaceTool.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index e5b03eb4d4..6a4ec08ec3 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -129,14 +129,14 @@ - Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. + Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. For correct display of normal-mapped surfaces, you will also have to generate tangents using [method generate_tangents]. [b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES]. - Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already. + Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already (see [method generate_normals]).