-
-
Notifications
You must be signed in to change notification settings - Fork 65
Use depth bias instead of physical offset for Text entity text #2007
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
base: master
Are you sure you want to change the base?
Conversation
|
This PR causes z-fighting on my machine, both on GLES and Vulkan: This is all on the forward renderer though it also happens on deferred. |
|
On my workstation, this behaves a lot better. (Mesa 25.3.2-2 on Intel Arc A770) OpenGL_2026-01-14.mp4Vulkan has very consistent z-fighting: Vulkan_2026-01-14.mp4OpenGL on master for comparison: master_OpenGL_2026-01-14.mp4On master, it is visible that things also move a little there, so that part is the same (this is on the forward renderer). It would be great to figure out what is happening on the Vulkan side. |
ksuprynowicz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good :)
|
Maybe for now we can make the change conditional, so that it happens only on OpenGL while Vulkan and GLES have the previous behavior? Later we can add depth bias support to Vulkan. |
|
Sorry, I should have mentioned and removed the review tags. This PR is on hold until we can figure out what's breaking it on some drivers. It's not mergable yet. |
|
Are there any currently known OpenGL drivers on which it doesn't work? |
|
Well, weirdly, the text renders fine for me (AMD with Mesa) even without the depth bias. I'm worried OpenGL's implementation-defined behavior for depth biasing might also bring issues. We'll need to test it more to be safe. I think GLES shares the depth biasing code with GL4.5, so something weird might be going on there too. |




Improves the look of Text entities, since the physical offset was a global constant, it could make the text stick out pretty far on small Text entities and the slight parallax even on larger ones felt kinda weird to look at
I've tested this with some of my toy scripts and looking at the Text entities around the hub. Everything looks to be working fine with this change.
Closes #2006
Before
After