Skip to content

Document sky shader half/quarter-res builtins not being available in Compatibility #10905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
33 changes: 18 additions & 15 deletions tutorials/shaders/shader_reference/sky_shader.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ desired balance between performance and visual fidelity.
Render modes
------------

Subpasses allow you to do more expensive calculations at a lower resolution
to speed up your shaders. For example the following code renders clouds at
a lower resolution than the rest of the sky:
In the Forward+ and Mobile renderers, subpasses allow you to do more expensive
calculations at a lower resolution to speed up your shaders. For example, the
following code renders clouds at a lower resolution than the rest of the sky:

.. code-block:: glsl

Expand All @@ -126,21 +126,23 @@ a lower resolution than the rest of the sky:
}
}

+--------------------------+-----------------------------------------------------------------------+
| Render mode | Description |
+==========================+=======================================================================+
| **use_half_res_pass** | Allows the shader to write to and access the half resolution pass. |
+--------------------------+-----------------------------------------------------------------------+
| **use_quarter_res_pass** | Allows the shader to write to and access the quarter resolution pass. |
+--------------------------+-----------------------------------------------------------------------+
| **disable_fog** | If used, fog will not affect the sky. |
+--------------------------+-----------------------------------------------------------------------+
+--------------------------+---------------------------------------------------------------------------+
| Render mode | Description |
+==========================+===========================================================================+
| **use_half_res_pass** | Allows the shader to write to and access the half resolution pass. |
| | *Only available in the Forward+ and Mobile renderers, not Compatibility.* |
+--------------------------+---------------------------------------------------------------------------+
| **use_quarter_res_pass** | Allows the shader to write to and access the quarter resolution pass. |
| | *Only available in the Forward+ and Mobile renderers, not Compatibility.* |
+--------------------------+---------------------------------------------------------------------------+
| **disable_fog** | If used, fog will not affect the sky. |
+--------------------------+---------------------------------------------------------------------------+

Built-ins
---------

Values marked as ``in`` are read-only. Values marked as ``out`` can optionally
be written to and will not necessarily contain sensible values. Samplers cannot
Values marked as ``in`` are read-only. Values marked as ``out`` can optionally
be written to and will not necessarily contain sensible values. Samplers cannot
be written to so they are not marked.

Global built-ins
Expand All @@ -150,7 +152,6 @@ Global built-ins are available everywhere, including in custom functions.

There are 4 ``LIGHTX`` lights, accessed as ``LIGHT0``, ``LIGHT1``, ``LIGHT2``, and ``LIGHT3``.


+---------------------------------+--------------------------------------------------------------------------------------------------------------------------+
| Built-in | Description |
+=================================+==========================================================================================================================+
Expand Down Expand Up @@ -206,8 +207,10 @@ Sky built-ins
| in vec2 **SKY_COORDS** | Sphere UV. Used to map a panorama texture to the sky. |
+-------------------------------+-------------------------------------------------------------------------------------------------+
| in vec4 **HALF_RES_COLOR** | Color value of corresponding pixel from half resolution pass. Uses linear filter. |
| | *Only available in the Forward+ and Mobile renderers, not Compatibility.* |
+-------------------------------+-------------------------------------------------------------------------------------------------+
| in vec4 **QUARTER_RES_COLOR** | Color value of corresponding pixel from quarter resolution pass. Uses linear filter. |
| | *Only available in the Forward+ and Mobile renderers, not Compatibility.* |
+-------------------------------+-------------------------------------------------------------------------------------------------+
| out vec3 **COLOR** | Output color. |
+-------------------------------+-------------------------------------------------------------------------------------------------+
Expand Down