Skip to content

Conversation

@ada-tv
Copy link
Collaborator

@ada-tv ada-tv commented Jan 7, 2026

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

without-depth-bias

After

with-depth-bias

@ada-tv ada-tv added enhancement New feature or request needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested labels Jan 7, 2026
@JulianGro
Copy link
Member

JulianGro commented Jan 8, 2026

This PR causes z-fighting on my machine, both on GLES and Vulkan:

master:
Screenshot_20260108_130248

This PR with Vulkan:
Screenshot_20260108_125613

This PR with GLES:
Screenshot_20260108_131644

This is all on the forward renderer though it also happens on deferred.
On a screenshot it isn't as obvious, but on master the text is just pixelated, while on this PR it flickers as if each letter was z-fighting.

@JulianGro
Copy link
Member

On my workstation, this behaves a lot better. (Mesa 25.3.2-2 on Intel Arc A770)
OpenGL looks fine:

OpenGL_2026-01-14.mp4

Vulkan has very consistent z-fighting:

Vulkan_2026-01-14.mp4

OpenGL on master for comparison:

master_OpenGL_2026-01-14.mp4

On 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.

@ada-tv
Copy link
Collaborator Author

ada-tv commented Jan 14, 2026

I couldn't reproduce the z-fighting on GLES, but I was able to reproduce it on Vulkan:
image

This might just be that our Vulkan backend doesn't support depth biasing yet.

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

Labels

enhancement New feature or request needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Depth offset for Text entities' text instead of physical distance from the background quad

2 participants