o3de / o3de-atom-sampleviewer

Atom sample viewer project for the Open 3D Engine
https://o3de.org
Other
31 stars 35 forks source link

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

Closed hosea1008 closed 2 months ago

hosea1008 commented 7 months ago

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

VickyAtAZ commented 7 months ago

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

hosea1008 commented 7 months ago

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 commented 2 months ago

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.