Creating shaders with the Shader Creation dialog
In this recipe, we take a look at the new Shader Creation dialog and the options you can select when you create shaders in Godot 4 such as Spatial, Canvas Item, Particles, Sky, and Fog.
Getting ready
For this recipe, open Godot 4 and start a new project called Chapter 5
. In the Scene tab, click 3D to add a 3D scene. Click on Scene in the main menu next to Project, then select Save Scene As, and name it Creationdialog
.
How to do it…
Let’s add a PlaneMesh to the scene and then add a new ShaderMaterial in the Material property where we can create a shader and see the new Shader Creation dialog:
- Left-click on the Node3D node and then press the + sign in the Scene tab. In the Create New Node window, type
mesh
in the Search box and then select MeshInstance3D to create the node in the scene. - In the Inspector, click on <empty> to the right of the mesh and select New PlaneMesh.
- Left-click on the...