You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my game, i use a wireframe art style, so i transform some meshes into wireframes using a script. One type of these meshes are static scenario parts, which render ok on all mobile devices, another type is characters, skinned models, which just refused to show up on certain phones.
Upon futher inspections, i discovered that this bug was only happening on Mali gpus, which would be ok, and i'd just forget about it, if they wouldn't be the most used gpus on the market rn (and for some reason, all samsung currently phones use them, wild).
The Debugger would throw me this error each time i called surface modifying function on the ArrayMesh Class (e.g. add_surface_from_arrays, surface_remove, surface_set_material) specifically on phones with Mali GPUs:
Upon even further inspections, i discorvered that Software Skinning is turn on by default on mobile - because the performance of GPU skinning isn't great overall - and when i turned it off, via disabling software_skinning_fallback in the ProjectSettings, characters where showing up normally.
Steps to reproduce
Grab any skinned model
Add a script to it with the following code:
func_ready():
vara=mesh.surface_get_arrays(0)
varm=mesh.surface_get_material(0)
mesh.surface_remove(0)
mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, a)
mesh.surface_set_material(0, m)
Export to android and run on any phone with a Mali GPU
Go back to the editor, under the ProjectSettings, turn rendering/quality/skinning/software_skinning_fallback off
Test again
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered:
Mali HW GPUs doesn't natively support wireframe rendering and must be emulated by the OpenGL driver (and in Vulkan, we have to do the emulation ourselves).
It's extremely likely that the Mali driver is just broken.
but this seemed like an issue with the sofware skinning, since skinning the mesh in the gpu works fine (on gles2 and android). are you sure this is an issue with Mali's drivers?
The software skinning only appears to support triangles, the wireframe is probably trying to use lines primitive. Maybe the software skinning fallback is only being used on Mali GPUs.
You can test this hypothesis with project_settings/rendering/quality/skinning/force_software_skinning and seeing if you get the same problem on other hardware.
If so this is likely a documentation issue.
You can solve it as you say by turning off software skinning fallback, but be aware that GPU skinning may not work on all mobile platforms.
Also be aware that using wireframe using GL_LINES in any production (especially non desktop) project is a little risky afaik because driver support can be patchy / slow (if you google for this, you may find alternative ways of drawing wireframe with shaders etc).
Godot version
v3.5.2.stable.official [170ba33]
System information
Tested on: Mali-G68 MC4, Mali-G71, Mali-G52 MC1, Adreno 642L & PowerVR Rogue GE8322
Issue description
In my game, i use a wireframe art style, so i transform some meshes into wireframes using a script. One type of these meshes are static scenario parts, which render ok on all mobile devices, another type is characters, skinned models, which just refused to show up on certain phones.
Upon futher inspections, i discovered that this bug was only happening on Mali gpus, which would be ok, and i'd just forget about it, if they wouldn't be the most used gpus on the market rn (and for some reason, all samsung currently phones use them, wild).
The Debugger would throw me this error each time i called surface modifying function on the ArrayMesh Class (e.g. add_surface_from_arrays, surface_remove, surface_set_material) specifically on phones with Mali GPUs:
Upon even further inspections, i discorvered that Software Skinning is turn on by default on mobile - because the performance of GPU skinning isn't great overall - and when i turned it off, via disabling
software_skinning_fallback
in the ProjectSettings, characters where showing up normally.Steps to reproduce
rendering/quality/skinning/software_skinning_fallback
offMinimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: