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

example-08-update: Scan through the LODs of the textures with shader. #3312

Closed
wants to merge 1 commit into from

Conversation

mcourteaux
Copy link
Contributor

I have not committed the binary shaders because when I rebuild them, literally all shaders gets modified, which is not on-topic for this PR, so I'll leave that to @bkaradzic.

I also updated the positions a little bit to reduce overlap:

image

So this PR uses time to loop through the different LODs.

image

This immediately reveals some issues:

Vulkan:

bgfx_update_vk.small.mp4

OpenGL:

bgfx_update_gl.small.mp4

ETC1 is flickering badly in deeper LODs.

@mcourteaux mcourteaux requested a review from bkaradzic as a code owner June 14, 2024 11:24
@bkaradzic
Copy link
Owner

It looks like that flickering is coming from border color state...

@bkaradzic
Copy link
Owner

See here:

m_textures[ 3] = loadTexture("textures/texture_compression_etc1.ktx", BGFX_SAMPLER_U_BORDER | BGFX_SAMPLER_V_BORDER | BGFX_SAMPLER_BORDER_COLOR(1));

ETC1 is just used to demonstrate sampler UV mode BORDER.

@bkaradzic bkaradzic closed this Jun 14, 2024
@bkaradzic
Copy link
Owner

Not a bug.

@mcourteaux
Copy link
Contributor Author

Even if it's not a bug, it's crucial to assess whichever solution we come up with for #3311. My first-idea fix produces glitches for the smallest LODs. So being able to check what the LOD mipmap chain looks like for these compressed texture formats is important if we want to get it right and fix #3311.

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

Successfully merging this pull request may close these issues.

2 participants