Improving the Sky Shader mode
In this recipe, we are going to create a custom sky using the Sky Shader mode in the Visual Shader Editor. Using sky shaders in Godot 4, you can update the sky in real time to create dynamic skies.
Getting ready
For this recipe, click on the + sign to the right of the UVFunc scene we just completed to add a new scene. In the Scene tab, click 3D Scene. Click on Scene in the top-left corner next to Project, then select Save Scene As, and name it SkyShader
.
How to do it…
First, we will add the WorldEnvironment node to the Scene tab so that we can create a shader on Sky Material:
- Left-click on the three vertical dots in the toolbar above the viewport and left-click on Add Environment to Scene.
- Left-click on the WorldEnvironment node in the Scene tab.
- In the Inspector, left-click on Environment to the right of Environment to open its properties.
- Left-click on Sky in the Inspector to open its properties.
- Left-click...