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

Tweak appearance of 3D editor gizmo icons #91174

Merged

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Apr 25, 2024

  • Use alpha scissor to resolve transparency sorting issues with gizmo icons relative to other transparent materials in the scene. This also makes gizmos visible in screen_texture, which means gizmos can now be seen through refractive materials. Lastly, this reduces the amount of artifacts visible around gizmo outlines (although they are still present at times).
  • Make icons darker when not selected to be less intrusive (and easier to distinguish when selected).
    • It's possible that the darkening effect is too strong, so this can be revisited later.

This isn't a perfect solution to all gizmo rendering problems by any means, but it should provide an usability upgrade already.

Preview

All screenshots/videos performed with a 1920×1080 editor window. At higher resolutions, gizmos look better (both before and after this PR).

All gizmos

The RGB stripes are located behind the gizmos' position, and they use a transparent (Alpha) material.

Before After
Screenshot_20240425_202528 Screenshot_20240425_202455

Selected gizmo comparison

Before After
Screenshot_20240425_202538 Screenshot_20240425_202602

Gizmo visible behind refractive material

Gizmos are still refracted (as they are part of the screen texture), but it's better than nothing.

Screenshot_20240425_202904

Transparency sorting

Before (incorrect)

The decal and camera gizmos appear behind the red toruses that are far away in the background, but they shouldn't.

simplescreenrecorder-2024-04-25_20.13.59.mp4

After (correct)

simplescreenrecorder-2024-04-25_20.13.28.mp4

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Looks good to me overall but I wonder if the new color isn't too dark/dim.

How about a 0.6 or 0.7 multiplier instead of 0.5?

@akien-mga akien-mga modified the milestones: 4.x, 4.3 May 7, 2024
@Calinou Calinou force-pushed the editor-gizmo-icons-tweak-rendering branch from 28e6c32 to 9b99ecd Compare May 7, 2024 22:54
@Calinou
Copy link
Member Author

Calinou commented May 7, 2024

How about a 0.6 or 0.7 multiplier instead of 0.5?

I've changed the multiplier to 0.6.

@akien-mga
Copy link
Member

Needs a rebase to fix web CI builds.

- Use alpha scissor to resolve transparency sorting issues with gizmo
  icons relative to other transparent materials in the scene.
  This also makes gizmos visible in `screen_texture`, which means
  gizmos can now be seen through refractive materials.
  Lastly, this reduces the amount of artifacts visible around gizmo
  outlines (although they are still present at times).
- Make icons darker when not selected to be less intrusive
  (and easier to distinguish when selected).
@Calinou Calinou force-pushed the editor-gizmo-icons-tweak-rendering branch from 9b99ecd to e52c9cd Compare May 8, 2024 15:13
@akien-mga akien-mga merged commit 15d2000 into godotengine:master May 8, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the editor-gizmo-icons-tweak-rendering branch May 9, 2024 15:13
@clayjohn
Copy link
Member

clayjohn commented May 9, 2024

Ooooh just noticed this. It caught me off guard. It will take some getting used to, but I think it is overall a great change

@Samwhamtymam
Copy link

Wow, I literally just noticed that my gizmos were vanishing for this reason today. Thanks for working on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sprite3D covers editor icons disregarding depth
4 participants