* fix artifacts on mobile
* feat(skybox): Add moon and milky way rendering
This commit enhances the simulated skybox with the following features:
- **Moon Rendering:** A textured moon with normal mapping has been added. The moon's phase is calculated and rendered correctly. Earthshine is also simulated.
- **Milky Way Background:** An equirectangular milky way texture is now rendered in the background. The intensity and saturation of the milky way can be adjusted.
- **Asset Processing Scripts:** Python scripts have been added to download and process the moon and milky way textures. This includes generating a normal map from a displacement map for the moon.
- **GUI Controls:** The GUI has been updated to include controls for the moon (azimuth, height, intensity, radius) and the milky way (intensity, saturation, sidereal time, latitude).
- **Real-time Sync:** The application can now use the user's geolocation to automatically set the position of the sun and moon.
- **Sun/Moon Calculation:** The library has been added to calculate the position of the sun and moon.
DOCS_FORCE
- Fix Moon normal calculation in shader (was inverted).
- Implement physically based Earthshine (dynamic based on phase).
- Add Moon scattering to Water reflection.
- Fix Star occlusion (masked by Moon).
- Improved Stars
- Add mobile touch support (Orbit control) to Camera.
DOCS_FORCE
- **Key Minification**: Refactored serialization to use short keys
(e.g., `p`, `c`, `w`) instead of verbose property names, reducing URL
size by ~50%.
- **State Optimization**: Removed redundant `sunDirection` from
serialized state.
- **Cleanup**: Removed backward compatibility for verbose keys
- **Bug Fix**: Fixed a regression where UI sliders failed to update on
load by ensuring array properties (e.g., `sunHalo`) are mutated
in-place rather than replaced.
DOCS_FORCE
- **State Management**:
- Refactored main.js to expose local UI parameter objects as class
properties for serialization.
- Implemented getURLState() to capture complete scene configuration
(Sky, Clouds, Water, Stars, Camera, Bloom).
- Implemented applyURLState() to restore settings and synchronize
the UI.
- **URL Sharing**:
- Added "Share Configuration" button to the UI.
- Configuration is Base64-encoded into a `config` URL query parameter.
- App now automatically parses and applies the `config` parameter
on startup, allowing for stateful deep linking.
DOCS_FORCE
- Extended Settings to include properties for Camera, Animation, Lights,
and Render options.
- Moved camera options from Viewer options to Camera options
- Implemented generic JSON parsing for these new settings in Settings.cpp.
- Updated AutomationEngine to apply these settings, including dynamic
creation of lights.
- Fixed a JSON parsing bug in AutomationSpec that failed on nested objects.
- Updated gltf_viewer to use the new settings and correctly initialize
AutomationEngine context.
- Add test for new json changes
- Add README to libs/viewer
- Link libs/viewer/README.md to official doc
- Remove unused libs/viewer/schemas
- Updated remote web assets (because the viewer/settings json needs to
match)
- **Stars**:
- Implemented procedural stars using hash-based noise.
- Added UI controls for Star Density and Enable/Disable.
- Tuned star brightness (reduced intensity) and refined twilight fade timing (visible during nautical twilight).
- Improved compositing with aggressive cloud occlusion and non-linear fade.
- Added star reflections to water, strictly masked to the horizon line.
- **Heat Shimmer**:
- Fixed horizon artifacts by decoupling shimmer from atmospheric density (Mie scattering).
- Implemented FBM-based view distortion for heat waves.
- Added sun elevation fade (shimmer fades out as sun rises > 30°).
- **Water**:
- Implemented Finite Difference normal calculation as a high-quality fallback when "Derivative Trick" is disabled.
- Added "Octaves" parameter to control wave detail.
- Refined reflection logic to handle stars and sun disk properly.
- **System**:
- Updated [simulated_skybox.mat](cci:7://file:///Users/mathias/sources/git/filament/docs_src/src_raw/wip/sky/simulated_skybox.mat:0:0-0:0) with new material parameters (`starControl`, `waterControl`).
- Refactored JS bindings in [SimulatedSkybox.js](cci:7://file:///Users/mathias/sources/git/filament/docs_src/src_raw/wip/sky/SimulatedSkybox.js:0:0-0:0) and organized `main.js` UI into logical folders.
DOCS_FORCE
- Also modify update script
- Renamed to update_remote_ui
- Repair path inside sciprt
- Ensure update script is not copied over to /docs
- Add requirements.txt (for python/pip dependencies)
- Move directories into more descriptive organization
- src_mdbook, src_markdeep, src_raw
- mdbook will be generated from mdbook
- markdeep will be generated to html
- raw will be copied without modification
- Add script that will run on a succesful commit to main. This
script will update /docs and commit the changes.