mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Add extra info from SurfaceTool class page
Added a few sentences about generate_normals() and generate_tangents() taken from the SurfaceTool class page in the docs.
This commit is contained in:
@@ -87,7 +87,13 @@ you want to use unique normals or colors per face instead of per-vertex), you ca
|
||||
|
||||
st.deindex()
|
||||
|
||||
If you don't add custom normals yourself, you can add them using ``generate_normals()``. The same goes for tangents.
|
||||
If you don't add custom normals yourself, you can add them using ``generate_normals()``, which should
|
||||
be called after generating geometry and before committing the mesh using ``commit()`` or
|
||||
``commit_to_arrays()``. Calling ``generate_normals(true)`` will flip the resulting normals. As a side
|
||||
note, ``generate_normals()`` only works if the primitive type is set to ``Mesh.PRIMITIVE_TRIANGLES``.
|
||||
|
||||
If you don't add custom tangents, they can be added with ``generate_tangents()``, but it requires
|
||||
that each vertex have UVs and normals set already.
|
||||
|
||||
.. tabs::
|
||||
.. code-tab:: gdscript GDScript
|
||||
|
||||
Reference in New Issue
Block a user