Skip to content
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

Improve next_pass documentation #9762

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
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
Binary file added tutorials/3d/img/next_pass.webp
Binary file not shown.
17 changes: 15 additions & 2 deletions tutorials/3d/standard_material_3d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,21 @@ The rendering order of objects can be changed, although this is mostly
useful for transparent objects (or opaque objects that perform depth draw
but no color draw, such as cracks on the floor).

Objects are sorted by an opaque/transparent queue, then :ref:`render_priority<class_Material_property_render_priority>`,
with higher priority being drawn later. Transparent objects are also sorted by depth.

Depth testing overrules priority. Priority alone cannot force opaque objects to be drawn over each other.

Next Pass
---------

Sets the material to be used for the next pass. This renders the object
again with a different material.
Setting :ref:`next_pass<class_Material_property_next_pass>` on a material
will cause an object to be rendered again with that next material.

Materials are sorted by an opaque/transparent queue, then :ref:`render_priority<class_Material_property_render_priority>`,
with higher priority being drawn later.

.. image:: img/next_pass.webp

Depth will test equal between both materials unless the grow setting or other vertex transformations are used.
Multiple transparent passes should use :ref:`render_priority<class_Material_property_render_priority>` to ensure correct ordering.