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

Fix for reading certain CRN textures #5618

Merged
merged 4 commits into from
Jul 25, 2017
Merged

Fix for reading certain CRN textures #5618

merged 4 commits into from
Jul 25, 2017

Conversation

lilleyse
Copy link
Contributor

Reported on the forum: https://groups.google.com/forum/#!topic/cesium-dev/0Io8gRRHIgs

In some cases dxtData will exceed length which throws an exception with set. This creates a view of the exact size needed before the set call.

@bagnell
Copy link
Contributor

bagnell commented Jul 12, 2017

dxtData will exceed length when there are mimaps. Perhaps add a comment?

Update CHANGES.md.

@lilleyse
Copy link
Contributor Author

Updated

@bagnell
Copy link
Contributor

bagnell commented Jul 12, 2017

Also, can you add a test?

@bagnell
Copy link
Contributor

bagnell commented Jul 12, 2017

Like we discussed offline, loading KTX has the same problem.

@lilleyse
Copy link
Contributor Author

Updated.

For KTX I just replaced .slice with new Uint8Array. Is the deep copy in transcodeCRNToDXT there because it's in a web worker?

@bagnell
Copy link
Contributor

bagnell commented Jul 25, 2017

Is the deep copy in transcodeCRNToDXT there because it's in a web worker?

Yes. We need to transfer the buffer back to the main thread; otherwise, we would need to transfer the whole buffer used by the transcoder.

@bagnell bagnell merged commit 7a51761 into master Jul 25, 2017
@bagnell bagnell deleted the crn-fix branch July 25, 2017 18:28
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.

2 participants