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

Metal: enable mipmap support #2235

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Conversation

smilediver
Copy link
Contributor

@smilediver smilediver commented Nov 14, 2024

Enables support for mipmapped textures in Metal. In Metal, mipmaps were ignored, because mipFilter for MTLSamplerDescriptor was never set.

Note: new graphic APIs like Metal do not support separate mipmap filters for minifying and magnifying textures, so I had to make a compromise and derive mip filter from the mag filter. I think in the future it would be best to change SamplerFilter enum to contain only LINEAR and NEAREST values and add SamplerMipFilter enum to contain LINEAR, NEAREST, NONE and in SamplerDescriptor add SamplerMipFilter mipFilter field.

@halx99 halx99 added this to the 2.3.0 milestone Nov 15, 2024
@halx99 halx99 added the enhancement New feature or request label Nov 15, 2024
@halx99 halx99 merged commit 502961d into axmolengine:dev Nov 15, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants