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

Distorted monochrome textures in Storm #3260

Open
rasmusbonnedal opened this issue Aug 30, 2024 · 2 comments
Open

Distorted monochrome textures in Storm #3260

rasmusbonnedal opened this issue Aug 30, 2024 · 2 comments

Comments

@rasmusbonnedal
Copy link

Description of Issue

When using mono channel textures where width is not dividable by 4 we are experiencing distortion in Storm.

The left texture is 500x500, the right is 501x500.

image

Steps to Reproduce

  1. Open this stage in usdview using GL renderer.
    repro.zip

The distorted texture is generated like this:

oiiotool --pattern checker:width=100 501x500 1 -o checker_501.png

The issue is present with both USDPreviewSurface and MaterialX materials. Same result with PNG and JPEG images.

From Jono Gibbs on ASWF Slack:
"Just tried it with my build of 24.08 on macOS and it works, so it could be a Windows thing?"

System Information (OS, Hardware)

  • Windows 11, Thinkpad T14 (AMD Ryzen 7840U, Radeon 780M)
  • Windows 10, Dell Precision 5690 (NVidia RTX 2000 Ada)
  • Ubuntu 24, WSL2 on same Thinkpad T14 as above

Package Versions

  • dev branch from 2024-08-29 (#6030846ba)
  • 24.05

Build Flags

python build_usd.py c:\WORK\USD\usd-24.11-dev-py310
@rasmusbonnedal
Copy link
Author

Jakub Jaroszek found this possible cause:
https://stackoverflow.com/questions/57346317/opengl-greyscale-texture-data-layout-doesnt-match-when-the-dimensions-arent-d

I tried the suggestion by inserting this in Stråla before initializing Hydra:

glPixelStorei(GL_UNPACK_ALIGNMENT, 1);

and it fixes the issue.

@jesschimein
Copy link

Filed as internal issue #USD-10051

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

No branches or pull requests

2 participants