Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow overlap sprite with shaded and billboard flags enabled #45147

Open
inara-work opened this issue Jan 13, 2021 · 5 comments
Open

Shadow overlap sprite with shaded and billboard flags enabled #45147

inara-work opened this issue Jan 13, 2021 · 5 comments

Comments

@inara-work
Copy link

Godot v3.2.3:

OS/device including version:
Linux 5.9.16-1-MANJARO
Tested with GLES2 and 3, same problem.

Issue description:
I want a sprites in billboard mode to cast shadows in a 3D environment. I've enabled billboard mode, check "Transparent", "Shaded" and "Double sided" flags and set "Alpha Cut" to "Opaque Pre-Pass". It casts shadows as expected, but there is some ugly shadow artifacts in front of my sprite, like this :

Capture1

This problem only occurs when I enable the "Shaded" flag. It work just fine when I disable it, like this :

Capture2

Steps to reproduce:
I tried on different computers, with both Linux and Windows, I ran it with GLES 2 & 3, I tried with the Sprite node and the MeshInstance one, with Spot, Directional Omni Lights, still the same... It really seems to be the Shaded flag fault.

To reproduce you just have to instantiate a Ground, a Sprite, and a OmniLight with Shadow enabled, set options described above on the sprite and watch.

Minimal reproduction project:
BugReport.zip

@clayjohn
Copy link
Member

Could you try adjusting the shadow bias on your light settings? This looks like the tree is casting a shadow on itself.

@inara-work
Copy link
Author

It actually cast a shadow on itself. But shadow bias is (in my case at least) not a satisfying solution because :

  1. I don't understand why it cast shadow on itself in the first place.
  2. Playing with bias and contact options give me a result almost as ugly than before, but add a terrible performance drop.
    If this behavior is intentional, It feel really buggy, and after varying options during an while, It can't bring me any satisfying result.

@Calinou
Copy link
Member

Calinou commented Jan 13, 2021

  1. Playing with bias and contact options give me a result almost as ugly than before, but add a terrible performance drop.
    If this behavior is intentional, It feel really buggy, and after varying options during an while, It can't bring me any satisfying result.

Contact shadows have known issues and will be removed in 4.0. See #35316.

@clayjohn
Copy link
Member

Could you upload a different MRP? Chrome is flagging your current one as malware. Ensure you upload an MRP that just contains the necessary files and doesn't include any extraneous executables or anything.

@Calinou
Copy link
Member

Calinou commented Jan 17, 2021

@clayjohn Here's the MRP with .import/ and .mono/ removed: BugReport.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants