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:
committed by
Copybara-Service
parent
0ca53dacf8
commit
7bc1aa9b05
@@ -3429,6 +3429,15 @@ Enables or disables the light.
|
||||
|
||||
Sets the intensity of the light, in candela.
|
||||
|
||||
.. _mjrf_setLightShadowMapSize:
|
||||
|
||||
`mjrf_setLightShadowMapSize <#mjrf_setLightShadowMapSize>`__
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. mujoco-include:: mjrf_setLightShadowMapSize
|
||||
|
||||
Sets the resolution of the light's shadow map, in texels.
|
||||
|
||||
.. _mjrf_setLightColor:
|
||||
|
||||
`mjrf_setLightColor <#mjrf_setLightColor>`__
|
||||
|
||||
@@ -3301,8 +3301,8 @@ Attributes may be applied or ignored depending on the lighting model being used.
|
||||
.. _body-light-bulbradius:
|
||||
|
||||
:at:`bulbradius`: :at-val:`real, "0.02"`
|
||||
The radius of the light source which can affect shadow softness depending on the
|
||||
renderer. This only applies to spotlights.
|
||||
The radius of the light-emitting surface. Larger radii produce softer shadows in renderers that
|
||||
support soft shadows. Ignored by the classic renderer.
|
||||
|
||||
.. _body-light-attenuation:
|
||||
|
||||
|
||||
@@ -3442,6 +3442,7 @@ mjrfLight* mjrf_createLight(mjrfContext* ctx, const mjrfLightParams* params);
|
||||
void mjrf_destroyLight(mjrfLight* light);
|
||||
void mjrf_setLightEnabled(mjrfLight* light, mjtBool enabled);
|
||||
void mjrf_setLightIntensity(mjrfLight* light, float intensity);
|
||||
void mjrf_setLightShadowMapSize(mjrfLight* light, int map_size);
|
||||
void mjrf_setLightColor(mjrfLight* light, const float color[3]);
|
||||
void mjrf_setLightTransform(mjrfLight* light, const float position[3], const float direction[3]);
|
||||
int mjrf_getLightType(const mjrfLight* light);
|
||||
|
||||
Reference in New Issue
Block a user