Skip to content

Add initial stencil documentation #10991

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

Conversation

QbieShay
Copy link
Contributor

@QbieShay QbieShay commented Jun 5, 2025

Documentation for godotengine/godot#80710

@Calinou Calinou added enhancement topic:rendering area:manual Issues and PRs related to the Manual/Tutorials section of the documentation topic:3d waiting on PR merge PR's that can't be merged until an engine PR is merged first labels Jun 5, 2025
Comment on lines +132 to +138
+-------------------------------+------------------------------------------------------------------------------------------------------+
| **compare_equal** | Pass stencil test if the reference value is equal to the stencil buffer value. |
+-------------------------------+------------------------------------------------------------------------------------------------------+
Copy link
Contributor

@MJacred MJacred Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing documentation:

+-------------------------------+------------------------------------------------------------------------------------------------------+
| **compare_always**            | Always pass stencil test.                                                                            |
+-------------------------------+------------------------------------------------------------------------------------------------------+

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also have an example of a super basic stencil material so users can see how the syntax looks

@@ -35,6 +35,10 @@ For visual examples of these render modes, see :ref:`Standard Material 3D and OR
+-------------------------------+------------------------------------------------------------------------------------------------------+
| **depth_test_disabled** | Disable depth testing. |
+-------------------------------+------------------------------------------------------------------------------------------------------+
| **depth_test_default** | Depth test will discard the pixel if it is behind other pixels. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to mention using Depth test equal for opaque pass in in Forward+ renderer

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will need to mention using Depth test equal for opaque pass in in Forward+ renderer

What would a user do with that extra information? I can't think of a scenario in which the user can tell the difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don' tthink i can fit it in this line of the documentation. any suggestion on where to put it?

@AThousandShips AThousandShips removed the waiting on PR merge PR's that can't be merged until an engine PR is merged first label Jun 12, 2025
@AThousandShips AThousandShips added this to the 4.5 milestone Jun 12, 2025

.. note::

You can only read stencil in the transparent pass.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can only read stencil in the transparent pass.
You can only read the stencil in the transparent pass.

Comment on lines 112 to 113
- Portals: Draw geometry that is normally "impossible" (non-Euclidian) by masking objects.
- Shadows: Draw sharp shadows without relying on shadow maps.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth mentioning that portals and shadows can only currently be implemented in very simple forms, due to the lack of a multi-pass/programmable compositor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Calinou removed shadows because I don't want to raise expectations too much, as there's likely some hard limitations there.

Co-authored-by: Hugo Locurcio <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation enhancement topic:rendering topic:3d
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants