Open avril-gh opened 4 years ago
tested on Galaxy S8+ / Android 9
@volzhs , thank's for testing ❤️ yes, i can confirm too, it does work on mali GPU's, ... but does not work on VideoCore IV HW
When light's shadows are disabled then on VideoCore IV HW GPU
, it looks like on @volzhs top image. But when shadows are enabled then it looks like top image but very dark (almost same color as background).
With such an old low-end GPU, it may also just not fully support the GL ES 2.0 spec. I wouldn't be surprised.
We can test if its a hardware specific issue by forcing the rgba_3d_shadows branch by setting this false: https://github.com/godotengine/godot/blob/50582446ad13a7ce034bdd8695409bf26c1abac3/drivers/gles2/rasterizer_storage_gles2.cpp#L5931
If you change that to false, and it still works fine on newer hardware, then the issue is likely with the hardware. If you change it to false, and you get similar errors on newer hardware, then the issue is with Godot itself.
@clayjohn
if you meant this config.use_rgba_3d_shadows = false; // !config.support_depth_texture;
then
it have no effect on VideoCore, still same error and dark scene when shadow used.
Then changing it to true
gives same error and dark scene on VideoCore,
but also same dark scene and error on other devices that worked fine before.
( _Also tried on PowerVR device, and there are no problem with shadows, but i could'nt get anything just all 0.0's from DEPTHTEXTURE, but that's for another issue. )
@avril-gh The use_rgba_3d_shadows
is there for devices like yours that do not support depth textures, so of course setting it to use depth texture on that device will fail.
I mae a mistake in my above post, I meant for you to set use_rgba_3d_shadows
to true
and test on the VideoCore device and on a newer device. You did it anyway despite my unclear instructions, so, thank you.
The fact that setting use_rgba_3d_shadows
creates the error on other devices means that it is likely a problem with use_rgba_3d_shadows
which you VideoCore device is forced to use because it doesn't support depth textures.
I will look into it and see what I can do.
I will look into it and see what I can do.
@clayjohn , thanks, awesome
I think I found a fix. This line should be storage->config.depth_buffer_internalformat
because it is a buffer and not an image. We did a big cleanup in #33844 for this before the 3.2 release and I guess we missed this one.
https://github.com/godotengine/godot/blob/2a10e301195abf1ad4894cf54aab71a9b6e1a734/drivers/gles2/rasterizer_scene_gles2.cpp#L135
Im doing a full rebuild so I can test this change. Ill have to check the results in the morning as it is getting late here.
awesome work! there's a big progress.
The storage->config.depth_buffer_internalformat
nicely fixes SpotLight
and OmniLight
shadow's ,
spotlight shadow on VideoCore IV HW
omnilight shadow on VideoCore IV HW
However there's still something wrong with DirectionalLight shadow. When Directional Light's shadow is enabled the whole object is dark.
A small test that perhaps may give some clues in debugging (?)
test project used - test-project.zip
@avril-gh Thanks for testing, I am having trouble running my android build, so it may take a bit before I can test as well.
When you run the scene with a DirectionalLight, do you still receive that same error message?
edit: Once I got it running on my android device, I can't reproduce the DirectionalLight issue.
@clayjohn
When you run the scene with a DirectionalLight, do you still receive that same error message?
yes, even when there are no DirectionalLight in the scene (i removed it) and there's only OmniLight, it looks normal, there is shadow, but the error persists anyway.
Godot Engine v3.2.2.beta.custom_build.cfc4526c1
Using GLES2 video driver
OpenGL ES 2.0 Renderer: VideoCore IV HW
**ERROR**: Directional shadow framebuffer status invalid
At: drivers\gles2\rasterizer_scene_gles2.cpp:4026:initialize() - Directional shadow framebuffer status invalid
Godot Engine v3.2.2.beta.custom_build.4e70279b5 Android 4.4 GPU VideoCore IV HW
On device log gives
Issue description: When lights have no shadows enabled, then scene is rendered ok. When lights shadows are enabled then everything turns very dark.
Steps to reproduce: Use example project attached, turn shadow option in light node's on and off
Minimal reproduction project: VideoCore-1.zip