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 Globe material issues. #6063

Merged
merged 2 commits into from Dec 17, 2017
Merged

Fix Globe material issues. #6063

merged 2 commits into from Dec 17, 2017

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented Dec 15, 2017

  • Fix shader compilation fail on pick.
  • Fix globe materials when enableLighting = false.

Fixes #6042 and #6039.

@cesium-concierge
Copy link

Signed CLA is on file.

@bagnell, thanks for the pull request! Maintainers, we have a signed CLA from @bagnell, so you can review this at any time.

⚠️ I noticed that CHANGES.md has not been updated. If this change updates the public API in any way, fixes a bug, or makes any non-trivial update, please add a bullet point to CHANGES.md and comment on this pull request so we know it was updated. For more info, see the Pull Request Guidelines.


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@pjcozzi
Copy link
Contributor

pjcozzi commented Dec 17, 2017

Thanks @bagnell. Please open a separate PR if there is a reasonable way to add unit tests, e.g., render globe materials with lighting set to false.

@pjcozzi pjcozzi merged commit 44dd734 into master Dec 17, 2017
@pjcozzi pjcozzi deleted the globe-mat-shader-fail branch December 17, 2017 15:21
@bagnell
Copy link
Contributor Author

bagnell commented Dec 18, 2017

The existing tests already have enableLighting = false; because it's the default. They're also broken.

They're in SceneSpec.js (should be in GlobeSpec.js). The polls finish when the scene doesn't render [0, 0, 0, 0] but the background color is [0, 0, 0, 255] so it finishes immediately. Also, after the polls are finished, there are no tests. Change the tests to the below and they fail:

var globe = s.globe;
return pollToPromise(function() {
    globe._surface._debug.enableDebugOutput = true;
    s.render();
    return globe._surface.tileProvider.ready && globe._surface._tileLoadQueueHigh.length === 0 && globe._surface._tileLoadQueueMedium.length === 0 && globe._surface._tileLoadQueueLow.length === 0 && globe._surface._debug.tilesWaitingForChildren === 0;
}).then(function() {
    expect(s).notToRender([0, 0, 0, 255]);
});

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

3 participants