godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.07k stars 21.18k forks source link

Sprite3D not casting a shadow #17567

Open Tobi-La opened 6 years ago

Tobi-La commented 6 years ago

Godot version:

3.0 stable and 2.1.4 stable

OS/device including version:

Phone: Oukitel K6000 Pro Android 6.0 GPU: ARM Mali-T720 (MP3) Driver: Open GL ES 3.1 and Open CL 1.2

Issue description: When using a Sprite3D with "alpha_cut" set to "Opaque Prepass" the drop shadow is missing on my Oukitel K6000 Pro. This happens in all versions of Godot I tested and seems to be device specific. I tested with two other phones (Samsung Galaxy S3 and Galaxy J5 Duos) and the issue only occurs on the K6000 Pro.

I am using Godot 2 for my project, so it would be glad it could be fixed there, too. But I tested and uploaded a test project for godot 3 to help fixing the issue on the current version.

Steps to reproduce:

  1. Set up a basic project
  2. Add a directional Light, a Sprite3D and some object to cast a shadow on.
  3. Set the "alpha_cut" of the sprite to "Opaque Prepass"

Minimal reproduction project:

Godot2: Sprite3DShadowTest_Godot2.zip Godot3: Sprite3DShadowTest_Godot3.zip

Screenshots Godot2 Project Oukitel: godot2_oukitel

Other devices: godot2_workingdevices

Screenshots Godot3 Project Oukitel: godot3_oukitel

Other devices: godot3_workingdevices

ghost commented 6 years ago

I don't know about rendering on mobile devices but I'd try removing Mali from here image

Tobi-La commented 6 years ago

Thank you for the tip Noshyaar, unfortunately it didn't work. I also tried removing the other two vendors, just in case, but no difference.

Calinou commented 4 years ago

If you can build Godot from source, please build the 3.2 branch and test this again now that https://github.com/godotengine/godot/pull/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 commented 4 years ago

Neither in Godot 3.2.3 stable nor 3.2.4 beta1 (Win64 with dedicated Nvidea graphics) Sprite3D shadows appear unless the alpha_cut flag is set to "Opaque Pre-Pass". However in which case transparency is not taken into account.

Sprite3D_no_shadow