o3de-atom-sampleviewer icon indicating copy to clipboard operation
o3de-atom-sampleviewer copied to clipboard

Ensure directional light shadow is turned on by default in the ASV examples

Open hosea1008 opened this issue 1 year ago • 2 comments

This should fix some of the failed test cases in #657

Partially Fix #657

This PR is to set the directional light shadow to be enabled by default due to https://github.com/o3de/o3de/pull/16913 grants access to control whether or not a directional light is casting shadow.

image

hosea1008 avatar Jan 27 '24 03:01 hosea1008

I wonder whether it makes sense to enable shadow by default within the engine. What was the reason to disable the shadow by default?

VickyAtAZ avatar Jan 29 '24 18:01 VickyAtAZ

I wonder whether it makes sense to enable shadow by default within the engine. What was the reason to disable the shadow by default?

Hi, I am not sure you are wondering about enabling or disabling, let me explain a bit:

Enable directional shadow in the engine: The engine currently only support one directional light shadow, but it allows us to add multiple directional lights, if the artist add more than one dir light, when entering game mode, an arbitrary one may cast shadow, this is not controllable, so I was adding the switch to turn on/off the shadow to let the artist decide which one dir light to cast shadow certainly, and the dir light shadow is enabled by default in the engine.

Disable the dir light shadow in ASV: This is not an intended behavior, it seems that the ASV is accessing the dir light fp directly, skipping the configuration and setting part, while the dir light shadow is expected to be enabled in the configuration. This commit is to fix this missing config.

hosea1008 avatar Jan 30 '24 01:01 hosea1008

Hi, I am wondering how this PR is going to be merged after collecting enough reviews and all checks passed? This PR would fix some of the known issues as discussed above, I am worrying it would be conflicted after waiting for long time.

hosea1008 avatar Jul 03 '24 01:07 hosea1008