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

Limit mipmap generation depth for LegacyCSL #5

Open
kuroneko opened this issue Mar 29, 2017 · 2 comments
Open

Limit mipmap generation depth for LegacyCSL #5

kuroneko opened this issue Mar 29, 2017 · 2 comments
Assignees
Milestone

Comments

@kuroneko
Copy link
Collaborator

By default, GL will create up to 100 levels of mipmap until the texture is only 1x1px unless otherwise limited, and the current rendering code makes no efforts to limit this.

Given that the typical LegacyCSL texture is practically useless at 1x1, we should limit mipmapping to something more reasonable.

@kuroneko kuroneko added the bug label Mar 29, 2017
@kuroneko
Copy link
Collaborator Author

with the standard 1024x1024 textures I'm seeing in X-CSL, there should be no more than 10 passes, but even that's too many.

Main consideration is that as the texture is an unwrapped single texture, by the time we get below about 64x64 pixels, there's no/little single-surface detail left in the texture anyway and we're likely to suffer from bleed from adjacent areas of the texture that aren't uv mapped near each other.

I'll limit to 6 passes, and revise after some visual checks that this is a sane limit.

@kuroneko
Copy link
Collaborator Author

kuroneko commented Mar 29, 2017

6 looks good in my testing branch, but there needs to be some adjustment of that counterpoint to derez - derezing the texture reduces the number of useful mips available. Fortunately this is 1:1, so it should be trivial to fix.

Screenshots show results with X-CSL with anisotropy enabled and the reduced mipmap levels.
far view
mid view

@kuroneko kuroneko self-assigned this Mar 29, 2017
@kuroneko kuroneko added this to the XSB 1.3.3 milestone Apr 3, 2017
@kuroneko kuroneko modified the milestones: XSB 1.3.3, XSB 1.4.0 Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant