gazebosim / gazebosim/gz-rendering

Point light attenuation/falloff does not work when cast_shadows is enabled

Open
#591 2 comments 0 reactions 0 assignees View on GitHub
bug help wanted ogre2.x
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.
![image](https://user-images.githubusercontent.com/206116/159375073-b3751b17-d44b-476f-b4cb-a011ada7a8d7.png)

with `cast_shadows = false`, the light falls of smoothly, but the box does not have a shadow.
![image](https://user-images.githubusercontent.com/206116/159375157-030adfaf-edf7-45b2-b898-6742de525b21.png)

## 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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.