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

Autodesk: Fix bug where Creation of HgiGLSampler will always set GL_TEXTURE_MAX_ANISOTROPY_EXT to 16 #2492

Merged

Conversation

erikaharrison-adsk
Copy link
Contributor

@erikaharrison-adsk erikaharrison-adsk commented Jun 16, 2023

Description of Change(s)

HgiGLSampler will always enable ANISOTROPY. But when the filter is nearest, we should disable anisotropy. In this branch we fix this issue. In the constructor of HgiGLSampler, we will check if the minFilter or magFilter is nearest. If yes, we will not set GL_TEXTURE_MAX_ANISOTROPY_EXT. When GL_TEXTURE_MAX_ANISOTROPY_EXT is set, it will ignore the minFilter and magFilter on some platform. This means that we will never create a nearest sampler.

Fixes Issue(s)

  • N/A
  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

…_ANISOTROPY_EXT to 16.

In the constructor of HgiGLSampler, we will check if the minFilter or magFilter is nearest. If yes, we will not set GL_TEXTURE_MAX_ANISOTROPY_EXT.

When GL_TEXTURE_MAX_ANISOTROPY_EXT is set, it will ignore the minFilter and magFilter on some platform. This means that we will never create a nearest sampler.

Formatting
@jesschimein
Copy link
Contributor

Filed as internal issue #USD-8424

@pixar-oss pixar-oss merged commit dfb39b0 into PixarAnimationStudios:dev Nov 1, 2023
pixar-oss pushed a commit that referenced this pull request Nov 1, 2023
anisotropy when the min or mag filter is nearest, matching the GL version (as
done in change 2300291).

Fixes #2492

(Internal change: 2300652)
@erikaharrison-adsk erikaharrison-adsk deleted the adsk/bugfix/HgiGLSampler branch December 1, 2023 22:34
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.

4 participants