Skip to content

Commit 43f478b

Browse files
committed
Standardize style within spatial_shader.rst
1 parent c5a0776 commit 43f478b

5 files changed

Lines changed: 40 additions & 41 deletions

File tree

tutorials/shaders/shader_reference/canvas_item_shader.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ Render modes
3232
+---------------------------------+----------------------------------------------------------------------+
3333
| **light_only** | Only draw on light pass. |
3434
+---------------------------------+----------------------------------------------------------------------+
35-
| **skip_vertex_transform** | VERTEX needs to be transformed manually in vertex function. |
35+
| **skip_vertex_transform** | ``VERTEX`` needs to be transformed manually in vertex function. |
3636
+---------------------------------+----------------------------------------------------------------------+
37-
| **world_vertex_coords** | VERTEX is modified in world coordinates instead of local. |
37+
| **world_vertex_coords** | ``VERTEX`` is modified in world coordinates instead of local. |
3838
+---------------------------------+----------------------------------------------------------------------+
3939

4040
Built-ins
4141
^^^^^^^^^
4242

43-
Values marked as "in" are read-only. Values marked as "out" are for optional writing and will
44-
not necessarily contain sensible values. Values marked as "inout" provide a sensible default
43+
Values marked as ``in`` are read-only. Values marked as ``out`` are for optional writing and will
44+
not necessarily contain sensible values. Values marked as ``inout`` provide a sensible default
4545
value, and can optionally be written to. Samplers are not subjects of writing and they are
4646
not marked.
4747

@@ -88,9 +88,9 @@ happen later) and do it manually with the following code:
8888
VERTEX = (MODEL_MATRIX * vec4(VERTEX, 0.0, 1.0)).xy;
8989
}
9090
91-
Other built-ins, such as UV and COLOR, are also passed through to the fragment function if not modified.
91+
Other built-ins, such as ``UV`` and ``COLOR``, are also passed through to the ``fragment()`` function if not modified.
9292

93-
For instancing, the INSTANCE_CUSTOM variable contains the instance custom data. When using particles, this information
93+
For instancing, the ``INSTANCE_CUSTOM`` variable contains the instance custom data. When using particles, this information
9494
is usually:
9595

9696
* **x**: Rotation angle in radians.
@@ -181,19 +181,19 @@ it to the ``NORMALMAP`` property. Godot will handle converting it for use in 2D
181181
+---------------------------------------------+---------------------------------------------------------------+
182182
| in vec4 **SPECULAR_SHININESS** | Specular shininess color, as sampled from the texture. |
183183
+---------------------------------------------+---------------------------------------------------------------+
184-
| in vec2 **UV** | UV from vertex function. |
184+
| in vec2 **UV** | UV from the ``vertex()`` function. |
185185
+---------------------------------------------+---------------------------------------------------------------+
186186
| in vec2 **SCREEN_UV** | Screen UV coordinate for current pixel. |
187187
+---------------------------------------------+---------------------------------------------------------------+
188188
| sampler2D **SCREEN_TEXTURE** | Removed in Godot 4. Use a ``sampler2D`` with |
189189
| | ``hint_screen_texture`` instead. |
190190
+---------------------------------------------+---------------------------------------------------------------+
191-
| inout vec3 **NORMAL** | Normal read from **NORMAL_TEXTURE**. Writable. |
191+
| inout vec3 **NORMAL** | Normal read from ``NORMAL_TEXTURE``. Writable. |
192192
+---------------------------------------------+---------------------------------------------------------------+
193193
| sampler2D **NORMAL_TEXTURE** | Default 2D normal texture. |
194194
+---------------------------------------------+---------------------------------------------------------------+
195195
| out vec3 **NORMAL_MAP** | Configures normal maps meant for 3D for use in 2D. If used, |
196-
| | overrides **NORMAL**. |
196+
| | overrides ``NORMAL``. |
197197
+---------------------------------------------+---------------------------------------------------------------+
198198
| out float **NORMAL_MAP_DEPTH** | Normalmap depth for scaling. |
199199
+---------------------------------------------+---------------------------------------------------------------+
@@ -240,9 +240,9 @@ Below is an example of a light shader that takes a CanvasItem's normal map into
240240
+----------------------------------+------------------------------------------------------------------------------+
241241
| in vec3 **NORMAL** | Input Normal. |
242242
+----------------------------------+------------------------------------------------------------------------------+
243-
| in vec4 **COLOR** | Input Color. This is the output of the fragment function. |
243+
| in vec4 **COLOR** | Input Color. This is the output of the ``fragment()`` function. |
244244
+----------------------------------+------------------------------------------------------------------------------+
245-
| in vec2 **UV** | UV from vertex function, equivalent to the UV in the fragment function. |
245+
| in vec2 **UV** | UV from vertex function, equivalent to the UV in the ``fragment()`` function.|
246246
+----------------------------------+------------------------------------------------------------------------------+
247247
| sampler2D **TEXTURE** | Current texture in use for CanvasItem. |
248248
+----------------------------------+------------------------------------------------------------------------------+

tutorials/shaders/shader_reference/fog_shader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ touch a given :ref:`FogVolume <class_FogVolume>` will still be used.
2121
Built-ins
2222
^^^^^^^^^
2323

24-
Values marked as "in" are read-only. Values marked as "out" are for optional
24+
Values marked as ``in`` are read-only. Values marked as ``out`` are for optional
2525
writing and will not necessarily contain sensible values. Samplers cannot be
2626
written to so they are not marked.
2727

tutorials/shaders/shader_reference/particle_shader.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ Render modes
3737
+--------------------------+-------------------------------------------+
3838
| **disable_force** | Disable attractor force. |
3939
+--------------------------+-------------------------------------------+
40-
| **disable_velocity** | Ignore **VELOCITY** value. |
40+
| **disable_velocity** | Ignore ``VELOCITY`` value. |
4141
+--------------------------+-------------------------------------------+
4242
| **collision_use_scale** | Scale the particle's size for collisions. |
4343
+--------------------------+-------------------------------------------+
4444

4545
Built-ins
4646
^^^^^^^^^
4747

48-
Values marked as "in" are read-only. Values marked as "out" are for optional writing and will
49-
not necessarily contain sensible values. Values marked as "inout" provide a sensible default
48+
Values marked as ``in`` are read-only. Values marked as ``out`` are for optional writing and will
49+
not necessarily contain sensible values. Values marked as ``inout`` provide a sensible default
5050
value, and can optionally be written to. Samplers are not subjects of writing and they are
5151
not marked.
5252

@@ -161,7 +161,7 @@ Process built-ins
161161
Process functions
162162
^^^^^^^^^^^^^^^^^
163163

164-
``emit_subparticle`` is currently the only custom function supported by
164+
``emit_subparticle()`` is currently the only custom function supported by
165165
particles shaders. It allows users to add a new particle with specified
166166
parameters from a sub-emitter. The newly created particle will only use the
167167
properties that match the ``flags`` parameter. For example, the

tutorials/shaders/shader_reference/sky_shader.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ a lower resolution than the rest of the sky:
139139
Built-ins
140140
^^^^^^^^^
141141

142-
Values marked as "in" are read-only. Values marked as "out" are for optional
142+
Values marked as ``in`` are read-only. Values marked as ``out`` are for optional
143143
writing and will not necessarily contain sensible values. Samplers cannot be
144144
written to so they are not marked.
145145

@@ -166,7 +166,7 @@ There are 4 ``LIGHTX`` lights, accessed as ``LIGHT0``, ``LIGHT1``, ``LIGHT2``, a
166166
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------+
167167
| in bool **AT_CUBEMAP_PASS** | Currently rendering to radiance cubemap. |
168168
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------+
169-
| in bool **LIGHTX_ENABLED** | ``LightX`` is visible and in the scene. If ``false``, other light properties may be garbage. |
169+
| in bool **LIGHTX_ENABLED** | ``LIGHTX`` is visible and in the scene. If ``false``, other light properties may be garbage. |
170170
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------+
171171
| in float **LIGHTX_ENERGY** | Energy multiplier for ``LIGHTX``. |
172172
+---------------------------------+--------------------------------------------------------------------------------------------------------------------------+

0 commit comments

Comments
 (0)