Add Filament lighting and shadow features and fixes.

- Add a hidden directional light to Filament scenes with no lights to work around soft shadow blackout bug.
- Respect quality/shadowsize as default shadow map resolution.
- Interpret light/bulbradius in correct units for each shadow type and update XML reference docs.
- Support updating the shadow map resolution of live Filament lights.
- Clamp light intensities to non-negative values in the Filament debug panel.

PiperOrigin-RevId: 957305808
Change-Id: Ic7a3430aaa3b117be7fbb7ace836d68e54cdf65a
This commit is contained in:
Yuval Tassa
2026-07-31 13:27:31 -07:00
committed by Copybara-Service
parent 0ca53dacf8
commit 7bc1aa9b05
11 changed files with 141 additions and 13 deletions
@@ -100,6 +100,8 @@ mat4 CalculateClipFromWorld(const mjrRect& viewport, const mjrCamera& cam) {
void SceneBridge::Update(const mjrRect& viewport, const mjvScene* scene) {
const mjModel* model = model_objects_->GetModel();
model_lights_->Update();
mjtNum hpos[3], hfwd[3];
float headpos[3], gazedir[3];
mjv_cameraInModel(hpos, hfwd, nullptr, scene);