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

Fixed crash when loading glTF's KHR_texture_transform without a sample #8065

Closed
wants to merge 5 commits into from

Conversation

ProjectBarks
Copy link
Contributor

@ProjectBarks ProjectBarks commented Aug 15, 2019

Cesium's implementation of the KHR_texture_transform extension of glTF makes poor assumptions that the optional sampler will be defined.

Sandcastle used for testing.

In response to: #7916

@cesium-concierge
Copy link

Thanks for the pull request @ProjectBarks!

  • ✔️ Signed CLA found.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@mramato
Copy link
Contributor

mramato commented Aug 15, 2019

We should add a unit test for this.

@emackey do you want to take a look at this (or have any suggestions for the simplest way @ProjectBarks can add a test for this case)?

@mramato
Copy link
Contributor

mramato commented Aug 15, 2019

Also, thanks @ProjectBarks!

@ProjectBarks
Copy link
Contributor Author

Great suggestions Matt. I did some performance comparisons offline and this was the best design performance wise.

Why does this always happen. It takes 2 seconds to check linting yet somehow I always forget to check before committing code
@emackey
Copy link
Contributor

emackey commented Aug 15, 2019

Hi guys. While trying to review this, I started to wonder why the texture transform code is concerned about the repeat enums at all, and why it would take a choice-of-three enum and convert it to a Boolean. Turns out, this code doesn't need to be dealing with that repeat setting or looking up the sampler at all. Model.js configures WebGL itself with that enum, we don't need to replicate it in fragment shader math.

I think I'll open a separate PR for this, and completely remove the repeat logic.

@mramato
Copy link
Contributor

mramato commented Aug 15, 2019

Thanks @emackey we'll leave this open until your PR is merged (in which case this should auto close).

@emackey emackey closed this Aug 16, 2019
@ProjectBarks ProjectBarks deleted the KHR_transform_fix branch August 16, 2019 14:27
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.

None yet

4 participants