gz-rendering
gz-rendering copied to clipboard
Point light attenuation/falloff does not work when cast_shadows is enabled
Environment
- OS Version: Ubuntu 20.04
- Source or binary build? source,
ign-rendering6
, f043b4fc - Render Engine: ogre2
Description
- Expected behavior: Point light attenuation/falloff to work regardless of
cast_shadows
. - Actual behavior:
When
cast_shadow
is enabled, the light does not falloff according to the attenuation parameters. For example, given the following light source
<light type="point" name="mylight">
<cast_shadows>true</cast_shadows>
<pose>0 0 2.5 0 0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.8 0.8 0.8 1</specular>
<direction>0 0 -1</direction>
<intensity>2</intensity>
<attenuation>
<range>4</range>
<linear>0.5</linear>
<constant>0.2</constant>
<quadratic>0.01</quadratic>
</attenuation>
</light>
with cast_shadows = true
, I get a sharp circle determined by the range (4m) of the light.
with cast_shadows = false
, the light falls of smoothly, but the box does not have a shadow.
Steps to reproduce
- Run the attached file (test.sdf.txt) in
ign gazebo
. - Change
<cast_shadows>
to true or false.