Ver código fonte

Remove shader materials page

skyace65 5 meses atrás
pai
commit
1a4ba56b0f

BIN
tutorials/shaders/img/shader_create.png


BIN
tutorials/shaders/img/shader_material_convert.png


BIN
tutorials/shaders/img/shader_material_create.png


BIN
tutorials/shaders/img/shader_material_editor.png


BIN
tutorials/shaders/img/visual_shader_code.png


BIN
tutorials/shaders/img/visual_shader_editor.png


+ 0 - 1
tutorials/shaders/index.rst

@@ -10,7 +10,6 @@ Shaders
    introduction_to_shaders
    shader_reference/index
    your_first_shader/index
-   shader_materials
    visual_shaders
    compute_shaders
    screen-reading_shaders

+ 0 - 81
tutorials/shaders/shader_materials.rst

@@ -1,81 +0,0 @@
-.. _doc_shader_materials:
-
-Shader materials
-================
-
-Introduction
-------------
-
-For the most common cases, Godot provides ready to use materials for
-most types of shaders, such as :ref:`StandardMaterial3D <class_StandardMaterial3D>`,
-:ref:`CanvasItemMaterial <class_CanvasItemMaterial>` and :ref:`ParticleProcessMaterial <class_ParticleProcessMaterial>`.
-They are flexible implementations that cover most use cases.
-
-Shader materials allow writing a custom shader directly, for maximum flexibility.
-Examples of this are:
-
--  Create procedural textures.
--  Create complex texture blending effects.
--  Create animated materials, or materials that change over time.
--  Create refractive effects or other advanced effects.
--  Create special lighting shaders for more exotic materials.
--  Animate vertices, like tree leaves or grass.
--  Create custom particle code.
--  And much more!
-
-Godot provides built-in functionality to make frequent operations
-easier. Additionally, Godot's shader editor will detect errors as you
-type, so you can see your edited shaders in real-time. It is also
-possible to edit shaders using a visual, node-based graph editor.
-
-Creating a ShaderMaterial
--------------------------
-
-Create a new ShaderMaterial in some object of your choice. Go to the
-"Material" property and create a ShaderMaterial.
-
-.. image:: img/shader_material_create.png
-
-Next, click on the shader material to see its properties. From here you
-can create a shader or visual shader. Regular shaders use code to set
-their properties while a visual shader uses a node based workflow.
-
-If you need to you can convert a visual shader to a text shader.
-However you can't convert a text shader to a visual shader.
-
-Choose one of them and you can start editing your shader.
-
-.. image:: img/shader_create.png
-
-If you create a regular shader click on it and the shader editor will open.
-
-.. image:: img/shader_material_editor.png
-
-If you create a visual shader the visual shader editor will open automatically.
-
-.. image:: img/visual_shader_editor.png
-
-In the visual shader editor you can click a button and see what your visual
-shader looks like as shader code. This can be useful if you're trying to
-replicate a text shader as nodes, or it can be used as a preview for converting
-your visual shader to a text shader.
-
-.. image:: img/visual_shader_code.png
-
-.. note::
-
-   To learn more about visual shaders, read :ref:`doc_visual_shaders`.
-
-Converting to ShaderMaterial
-----------------------------
-
-It is possible to convert from StandardMaterial3D, CanvasItemMaterial and
-ParticleProcessMaterial to ShaderMaterial. To do so, go to the material properties
-and select the convert option.
-
-.. image:: img/shader_material_convert.png
-
-.. note::
-
-   Using the convert option will turn the StandardMaterial3D into a ShaderMaterial
-   with a text shader, not a visual shader.

+ 8 - 0
tutorials/shaders/your_first_shader/your_first_2d_shader.rst

@@ -53,6 +53,14 @@ you are writing a CanvasItem Shader or a Spatial Shader and it previews the
 output of spatial shaders. So what you are seeing is the output of the default
 Spatial Shader.
 
+.. note::
+  Materials that inherit from the :ref:`class_Material` resource, such as :ref:`class_StandardMaterial3D`
+  and :ref:`class_ParticleProcessMaterial`, can be converted to a :ref:`class_ShaderMaterial`
+  and their existing properties will be converted to an accompanying text shader.
+  To do so, right-click on the material in the FileSystem dock and choose
+  **Convert to ShaderMaterial**. You can also do so by right-clicking on any
+  property holding a reference to the material in the inspector.
+
 Click beside "Shader" and select "New Shader". Finally, click on the shader
 you just created and the shader editor will open. You are now ready to begin writing
 your first shader.

+ 8 - 0
tutorials/shaders/your_first_shader/your_first_3d_shader.rst

@@ -92,6 +92,14 @@ surface, so instead of an array of materials there is only one. Set the
 **Material** to a new ShaderMaterial, then expand the material by clicking on
 the sphere that appears.
 
+.. note::
+  Materials that inherit from the :ref:`class_Material` resource, such as :ref:`class_StandardMaterial3D`
+  and :ref:`class_ParticleProcessMaterial`, can be converted to a :ref:`class_ShaderMaterial`
+  and their existing properties will be converted to an accompanying text shader.
+  To do so, right-click on the material in the FileSystem dock and choose
+  **Convert to ShaderMaterial**. You can also do so by right-clicking on any
+  property holding a reference to the material in the inspector.
+
 Now set the material's **Shader** to a new Shader by clicking ``<empty>`` and
 select **New Shader...**. Leave the default settings, give your shader a name,
 and click **Create**.