summaryrefslogtreecommitdiff
path: root/doc/classes/SurfaceTool.xml
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-10-01 17:20:25 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-10-01 17:20:25 +0200
commitd339388942db56212e5513f6f13f4ffd47f9a79b (patch)
treed95c9f81a2b527cbebbdb363986cacbd488df643 /doc/classes/SurfaceTool.xml
parent93cb71cca950dc8a52b6c669b8a6ea699a9fc7f0 (diff)
Document SurfaceTool must generate tangents for proper normal display
Diffstat (limited to 'doc/classes/SurfaceTool.xml')
-rw-r--r--doc/classes/SurfaceTool.xml4
1 files 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 @@
<return type="void" />
<argument index="0" name="flip" type="bool" default="false" />
<description>
- 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].
</description>
</method>
<method name="generate_tangents">
<return type="void" />
<description>
- 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]).
</description>
</method>
<method name="get_custom_format" qualifiers="const">