Shader materials

    Shader materials allow writing a custom shader directly, for maximum flexibility. Examples of this are:

    • Create complex texture blending effects.
    • Create animated materials, or materials that change over time.
    • Create refractive effects or other advanced effects.
    • 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.

    Edit the newly created shader, and the shader editor will open:

    It is possible to convert from SpatialMaterial, CanvasItemMaterial and ParticlesMaterial to ShaderMaterial. To do so, go to the material properties and select the convert option.

    ../../_images/shader_material_convert.png