gazebosim / gazebosim/gz-rendering
Point light attenuation/falloff does not work when cast_shadows is enabled
- Dominant language
- C++
- Stars
- 81
- Forks
- 90
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 10
Description
## 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
```xml
true
0 0 2.5 0 0 0
0.8 0.8 0.8 1
0.8 0.8 0.8 1
0 0 -1
2
4
0.5
0.2
0.01
```
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
1. Run the attached file ([test.sdf.txt](https://github.com/ignitionrobotics/ign-rendering/files/8319650/test.sdf.txt)) in `ign gazebo`.
2. Change `` to true or false.
Contributor guide
Assessment
This issue has not been assessed yet.