Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tutorials/shaders/shader_reference/shading_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ using ``//`` for single-line comments and ``/* */`` for multi-line comments:
Additionally, you can use documentation comments that are displayed in the
inspector when hovering a shader parameter. Documentation comments are currently
only supported when placed immediately above a ``uniform`` declaration. These
documentation comments only support the **multiline** comment syntax and must use
**two** leading asterisks (``/**``) instead of just one (``/*``):
documentation comments only support the **multiline** comment syntax
(even if used on a single line) and must use **two** leading asterisks
(``/**``) instead of just one (``/*``):

.. code-block:: glsl

Expand All @@ -137,6 +138,9 @@ documentation comments only support the **multiline** comment syntax and must us
*/
uniform int something = 1;

/** This is a single-line documentation comment. */
uniform float something_else = 1.0;

The asterisks on the follow-up lines are not required, but are recommended as
per the :ref:`doc_shaders_style_guide`. These asterisks are automatically
stripped by the inspector, so they won't appear in the tooltip.
Expand Down
Loading