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

Dual-translucent Gizmos #9475

Open
viridia opened this issue Aug 17, 2023 · 0 comments
Open

Dual-translucent Gizmos #9475

viridia opened this issue Aug 17, 2023 · 0 comments
Labels
A-Gizmos Visual editor and debug gizmos C-Feature A new feature, making something new possible

Comments

@viridia
Copy link
Contributor

viridia commented Aug 17, 2023

What problem does this solve or what need does it fill?

Gizmos often interpenetrate objects in the scene. In many cases, you'd like to see the entire gizmo, including the parts that are obscured by other objects, but you would also like to know where they penetrate.

What solution would you like?

A solution I have used many times in three.js is to make the gizmos render in two passes:

  • The first pass has a relatively high opacity, and uses a Z-Test function of GREATER.
  • The second pass has a lower opacity and uses a Z-Test function of LESS_OR_EQUAL.

This means that the parts of the gizmo which are not obscured by other object render brightly, but the parts which are obscured render dimly.

What alternative(s) have you considered?

Writing my own gizmo system, which I would prefer to avoid :)

Additional context

A screenshot from my three.js engine. Note how the lines for the physics colliders are dimmer in places where they are obscured by other objects in the scene:

door-marks
@viridia viridia added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Aug 17, 2023
@alice-i-cecile alice-i-cecile added A-Gizmos Visual editor and debug gizmos and removed S-Needs-Triage This issue needs to be labelled labels Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Gizmos Visual editor and debug gizmos C-Feature A new feature, making something new possible
Projects
None yet
Development

No branches or pull requests

2 participants