-
Notifications
You must be signed in to change notification settings - Fork 949
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
Fix Metal Mipmap Behvior #3610
Fix Metal Mipmap Behvior #3610
Conversation
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.
There are a few other things that don't look right with lod_clamp
but could be addressed by a different PR.
lod_max_clamp
needs to default to32
(right now it defaults tof32::MAX
)lod_clamp
is set toNone
iflod_max_clamp > 32
which doesn't seem rightdx12
andvulkan
then map alod_clamp: None
to0.0..16.0
which also doesn't seem right; I think we should makelod_clamp
required at the hal level
K, went a little hog wild fixing up sampler stuff. I also brought aniso behavior inline with the spec and made the errors better. |
13babec
to
748f7fa
Compare
748f7fa
to
3c4ee19
Compare
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.
The LOD changes look good, thanks for addressing all my concerns in this PR!
I left a comment about the type and validation of anisotropy_clamp
.
It also looks like this PR will fix/close #3275 🚀
Ah, actually one remaining thing regarding the LOD changes, could you also update the Default impl of the sampler descriptors? I'm not sure why we have 2 types of |
d323eb9
to
efd0c8b
Compare
3d98183
to
b2aab81
Compare
b2aab81
to
e948314
Compare
0222918
to
00e795d
Compare
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.
Looks great!
Someday I'll stop pushing commits to this damn PR
I think you can now :)
Checklist
cargo clippy
.RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown
if applicable.Description
Couple issues I found when debugging a problem:
NotMipmapped
(which unconditionally samples mip 0) when the LodClamp was None. This is incorrect, LodClamp of None just means there's no restrictions on the Lod.texelFetch
-ing texels of different mipmaps. This would potentially blend the mipmap levels in an unintended way.Also resolves #3275.
Testing
Tested using rend3.