Skip to content

fix: handle flipY: false correctly in copyExternalImageToTexture#337

Open
branikclimbs wants to merge 1 commit intowcandillon:mainfrom
branikclimbs:fix/copy-external-image-flipy-optional-bool
Open

fix: handle flipY: false correctly in copyExternalImageToTexture#337
branikclimbs wants to merge 1 commit intowcandillon:mainfrom
branikclimbs:fix/copy-external-image-flipy-optional-bool

Conversation

@branikclimbs
Copy link

Fixes #336

Summary

  • Fix std::optional<bool> check in GPUQueue::copyExternalImageToTexture that treated flipY: false the same as flipY: true
  • if (source->flipY)if (source->flipY.value_or(false))

Context

Three.js r173 (mrdoob/three.js#30260) started passing flipY explicitly to copyExternalImageToTexture. This exposed the bug — GLTF textures pass flipY: false, which engaged the optional and triggered the flip path, producing visually corrupted textures.

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.

copyExternalImageToTexture produces incorrect results when flipY is explicitly set to false

1 participant