Explorar o código

Merge pull request #53305 from Calinou/doc-surfacetool-generate-tangents

Document SurfaceTool must generate tangents for proper normal display
Rémi Verschelde %!s(int64=4) %!d(string=hai) anos
pai
achega
871910feaf
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      doc/classes/SurfaceTool.xml

+ 2 - 2
doc/classes/SurfaceTool.xml

@@ -129,14 +129,14 @@
 			<return type="void" />
 			<return type="void" />
 			<argument index="0" name="flip" type="bool" default="false" />
 			<argument index="0" name="flip" type="bool" default="false" />
 			<description>
 			<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].
 				[b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES].
 			</description>
 			</description>
 		</method>
 		</method>
 		<method name="generate_tangents">
 		<method name="generate_tangents">
 			<return type="void" />
 			<return type="void" />
 			<description>
 			<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>
 			</description>
 		</method>
 		</method>
 		<method name="get_custom_format" qualifiers="const">
 		<method name="get_custom_format" qualifiers="const">