mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
Convert SpatialMaterial references to StandardMaterial3D.
This commit is contained in:
@@ -7,7 +7,7 @@ Introduction
|
||||
------------
|
||||
|
||||
For the most common cases, Godot provides ready to use materials for
|
||||
most types of shaders, such as :ref:`SpatialMaterial <class_SpatialMaterial>`,
|
||||
most types of shaders, such as :ref:`StandardMaterial3D <class_StandardMaterial3D>`,
|
||||
:ref:`CanvasItemMaterial <class_CanvasItemMaterial>` and :ref:`ParticlesMaterial <class_ParticlesMaterial>`.
|
||||
They are flexible implementations that cover most use cases.
|
||||
|
||||
@@ -69,7 +69,7 @@ your visual shader to a text shader.
|
||||
Converting to ShaderMaterial
|
||||
----------------------------
|
||||
|
||||
It is possible to convert from SpatialMaterial, CanvasItemMaterial and
|
||||
It is possible to convert from StandardMaterial3D, CanvasItemMaterial and
|
||||
ParticlesMaterial to ShaderMaterial. To do so, go to the material properties
|
||||
and select the convert option.
|
||||
|
||||
@@ -77,5 +77,5 @@ and select the convert option.
|
||||
|
||||
.. note::
|
||||
|
||||
Using the convert option will turn the SpatialMaterial into a ShaderMaterial
|
||||
Using the convert option will turn the StandardMaterial3D into a ShaderMaterial
|
||||
with a text shader, not a visual shader.
|
||||
|
||||
@@ -58,7 +58,7 @@ Global built-ins are available everywhere, including custom functions.
|
||||
Vertex built-ins
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
In order to use the ``COLOR`` variable in a SpatialMaterial, set ``use_vertex_as_albedo``
|
||||
In order to use the ``COLOR`` variable in a StandardMaterial3D, set ``use_vertex_as_albedo``
|
||||
to ``true``. In a ShaderMaterial, access it with the ``COLOR`` variable.
|
||||
|
||||
+---------------------------------+-------------------------------------------------------------------------------------+
|
||||
|
||||
@@ -141,7 +141,7 @@ when you are looking at the surface head-on or at a glancing angle.
|
||||
float fresnel = sqrt(1.0 - dot(NORMAL, VIEW));
|
||||
|
||||
And mix it into both ``ROUGHNESS`` and ``ALBEDO``. This is the benefit of ShaderMaterials over
|
||||
SpatialMaterials. With SpatialMaterials, we could set these properties with a texture, or to a flat
|
||||
StandardMaterial3Ds. With StandardMaterial3D, we could set these properties with a texture, or to a flat
|
||||
number. But with shaders we can set them based on any mathematical function that we can dream up.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user