瀏覽代碼

Add reference to build-in variables in Shader Language overview (#5084)

* Add reference to build-in variables in Shader Language overview
Oskar van Velden 4 年之前
父節點
當前提交
1bf43b56a6
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      tutorials/shaders/shader_reference/shading_language.rst

+ 10 - 0
tutorials/shaders/shader_reference/shading_language.rst

@@ -748,6 +748,16 @@ Uniforms can also be assigned default values:
     uniform vec4 some_vector = vec4(0.0);
     uniform vec4 some_vector = vec4(0.0);
     uniform vec4 some_color : hint_color = vec4(1.0);
     uniform vec4 some_color : hint_color = vec4(1.0);
 
 
+Built-in variables
+------------------
+
+A large number of built-in variables are available, like ``UV``, ``COLOR`` and ``VERTEX``. What variables are available depends on the type of shader (``spatial``, ``canvas_item`` or ``particle``) and the function used (``vertex``, ``fragment`` or ``light``).
+For a list of the build-in variables that are available, please see the corresponding pages:
+
+- :ref:`Spatial shaders <doc_spatial_shader>`
+- :ref:`Canvas item shaders <doc_canvas_item_shader>`
+- :ref:`Particle shaders <doc_particle_shader>`
+
 Built-in functions
 Built-in functions
 ------------------
 ------------------