From 9d7ca5e16445bf8e9cb78fe52b34c490a45f601c Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 16 Jun 2026 01:31:11 +0200 Subject: [PATCH] Mention shader type in Introduction to shaders The first shader example is a valid `canvas_item` shader, but not a valid `spatial` shader as `COLOR` is read-only in `spatial`'s `fragment()` (it reads the vertex color). --- tutorials/shaders/introduction_to_shaders.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tutorials/shaders/introduction_to_shaders.rst b/tutorials/shaders/introduction_to_shaders.rst index 2e4162f458b..2b9f9c66a46 100644 --- a/tutorials/shaders/introduction_to_shaders.rst +++ b/tutorials/shaders/introduction_to_shaders.rst @@ -36,6 +36,8 @@ look like this. .. code-block:: glsl + shader_type canvas_item; + void fragment() { COLOR = some_color; }