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

Y-Billboard Sprite3D does not cast shadows #27738

Open
IanWark opened this issue Apr 6, 2019 · 6 comments
Open

Y-Billboard Sprite3D does not cast shadows #27738

IanWark opened this issue Apr 6, 2019 · 6 comments

Comments

@IanWark
Copy link

IanWark commented Apr 6, 2019

Godot version:
3.06.stable.official.8314054. I had also tried it on 3.1 with the same results.

OS/device including version:
Windows 10 Home
NVIDIA GeForce GTX 1080 with Driver Version 25.21.14.1967

Issue description:
3D sprites cast shadows when Depth Draw Mode is set to "Opaque Pre-Pass", but when Billboard Mode is set to "Y-Billboard" the sprite no longer casts shadows. Using the normal "Enabled" Billboard Mode works mostly as I expected "Y-Billboard" to also work (shadow is upside down but I think changing properties can fix that).

Y-Billboard Shadows
In this example screenshot, the closer sprite is set to "Enabled", and the farther sprite is set to "Y-Billboard". Other properties are the same.

Steps to reproduce:
Easiest is to open up the Minimal reproduction project and look at it.
Otherwise get yourself a light, a plane, and a sprite. Set the sprite material Depth Draw Mode to "Opaque Pre-Pass" and set Billboard Mode to "Y-Billboard".

Minimal reproduction project:
Y-Billboard Shadows.zip

@kaadmy
Copy link
Contributor

kaadmy commented Apr 11, 2019

So, this is a really strange issue.

If I create a MeshInstance with a similar material (transparent, opaque pre-pass, billboard enabled), the shadow works the same as the Sprite3D
scrot_window_20190411_134947

But if I change the billboard mode for the Y-billboard sprite to a regular billboard, the shadow still doesn't work
scrot_window_20190411_135000

And when I change the depth mode on the same sprite the new MeshInstance loses its shadow
scrot_window_20190411_135036

I'm confused.

@Calinou
Copy link
Member

Calinou commented Jul 6, 2020

If you can build Godot from source, please build the 3.2 branch and test this again now that #39867 has been merged. (That pull request also makes Sprite3D much faster to render.)

You can also use this Windows 64-bit editor binary for testing.

@golddotasksquestions
Copy link

golddotasksquestions commented Nov 8, 2020

I can replicate this issue in Godot 3.2.3 stable and 3.2.4 beta1 using Win64 and dedicated Nvidea graphics.

@ghost
Copy link

ghost commented May 16, 2021

Is there any news on this issue? I still can replicate this in v3.3-stable.

@Calinou
Copy link
Member

Calinou commented May 16, 2021

Is there any news on this issue? I still can replicate this in v3.3-stable.

As far as I know, nobody found a solution to this problem yet.

As a workaround, you can use a second Sprite3D or MeshInstance whose shadow rendering mode is set to Shadows Only in its GeometryInstance section and make this node a child of your original Sprite3D. This one should have a separate opaque material, and can use the standard (non-Y) billboard mode if needed.

@ghost
Copy link

ghost commented May 16, 2021

I'll use the workaround for now. Thanks for the info

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

4 participants