CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
13.02k stars 3.51k forks source link

Add fallback spherical harmonics when dynamic environment lighting is unsupported #12292

Closed ggetz closed 2 weeks ago

ggetz commented 2 weeks ago

Description

While the extensions needed for dynamic environment lighting are available in most systems, we were seeing downstream testing difficulties when using a WebGL stub that didn't support the required WebGL extensions.

This change:

image

Diffuse lighting when dynamic updates are disabled or not supported

image

Before: No diffuse light if dynamic updates were disabled

Issue number and link

N/A

Testing plan

  1. CI should pass (CI runs with --webgl-stub)
  2. Local tests should pass
  3. For extra credit, checkout the effect when setting enabled to false, as in this Sandcastle

Author checklist

github-actions[bot] commented 2 weeks ago

Thank you for the pull request, @ggetz!

:white_check_mark: We can confirm we have a CLA on file for you.

ggetz commented 2 weeks ago

@jjspace This is ready for review!

ggetz commented 2 weeks ago

I was also seeing some extra spec failures on this branch locally that aren't happening in main. Not sure if it's directly related to this change or not

Good catch @jjspace, I must have forgotten to run all tests without --webgl-stub locally. These failures are expected. Fixed with some minor cleanup.