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

Objects are colored magenta in 3D Preview on some newer AMD cards on Windows #267

Open
mtolly opened this issue Jun 30, 2024 · 0 comments
Open

Comments

@mtolly
Copy link
Owner

mtolly commented Jun 30, 2024

This is some kind of odd behavior from the AMD Windows graphics driver. (Not the first time...)

image

image

Devices with this behavior reported:

  • AMD Radeon RX 6700 XT
  • Other unspecified RDNA2 card

Devices that do not exhibit this:

  • Steam Deck (LCD), RDNA2, using the Valve-provided Aerith driver
  • AMD Radeon RX 580, pre-RDNA

I believe the magenta has to come from this line in the fragment shader. Somehow the type variable is not being read as a valid number 1 through 4.

ChatGPT and Claude suggested possible issues:

Uniform Data Alignment:
AMD GPUs can be more sensitive to data alignment issues in uniform blocks. The ImageOrColor struct contains mixed types (uint, vec4, and sampler2D), which might cause alignment problems.

Uniform Buffer Object (UBO) vs. Individual Uniforms:
If you're using a UBO for the Material struct, ensure that the std140 or std430 layout is correctly implemented and that the offsets are properly calculated.

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

1 participant