godot icon indicating copy to clipboard operation
godot copied to clipboard

Shadowmap filtering regression.

Open SaracenOne opened this issue 1 year ago • 2 comments

Tested versions

e2c6daf7eff6e0b7e2e8d967e95a9ad56e948231

System information

Godot v4.4.dev (65f3df592) - Windows 10.0.22631 - Single-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (NVIDIA; 32.0.15.6094) - AMD Ryzen 9 7950X 16-Core Processor (32 threads)

Issue description

Found another regression introduced in e2c6daf7eff6e0b7e2e8d967e95a9ad56e948231. It looks like all filtering for shadow maps no-longer works. Once again, only affects Forward+ and mobile renderers. Post e2c6daf7eff6e0b7e2e8d967e95a9ad56e948231 godot windows editor dev x86_64_EXy1sxlQmB Pre e2c6daf7eff6e0b7e2e8d967e95a9ad56e948231 godot windows editor dev x86_64_sSUadArpKU

Steps to reproduce

  • Create a directional light.
  • Enable a shadow.

Minimal reproduction project (MRP)

N/A

SaracenOne avatar Oct 05 '24 09:10 SaracenOne

Was the filtering improved recently? Perhaps it was a conflict from when I rebased it. CC @clayjohn

Commenting to participate and look into it later.

DarioSamo avatar Oct 05 '24 14:10 DarioSamo

There were some changes recently, but they only take effect when using TAA/FSR2.2. I don't think that is what we are seeing here

clayjohn avatar Oct 05 '24 17:10 clayjohn

I can't reproduce this in 4.4.dev 04692d83c (Linux, GeForce RTX 4090 with NVIDIA 560.35.03):

image

Lavapipe is also able to render it correctly:

image

TAA and FSR2.2 are disabled.

This can be tested in Truck Town which uses Forward+, but should render correctly when switched to Mobile too.

Calinou avatar Oct 17 '24 12:10 Calinou

I'm unable to reproduce this as well. The only way I can get the shadow to show up like in OP's picture is to turn the Light's blur parameter to 0.

Could you upload an MRP with the issue? Perhaps there's a particular configuration setting we're missing.

DarioSamo avatar Oct 17 '24 17:10 DarioSamo

I've finally found out the cause: it only breaks when the shadow filter quality is set to High or Ultra. This affects both Forward+ and Mobile.

This affects all light types.

Minimal reproduction project: test_shadow_filter.zip

Calinou avatar Oct 26 '24 13:10 Calinou

I've finally found out the cause: it only breaks when the shadow filter quality is set to High or Ultra.

Do you happen to know off the top of your head if these qualities correspond to a sample count >= 16? Perhaps it just needs a little expansion of the bits available to the sample count in the new specialization constants structure.

DarioSamo avatar Oct 28 '24 12:10 DarioSamo

Should be fixed by https://github.com/godotengine/godot/pull/98614, please let me know if it works.

DarioSamo avatar Oct 28 '24 13:10 DarioSamo