Open scgm0 opened 1 year ago
Note that mobile GPUs have poor support for compute shaders across the board, so using compute shaders on mobile is not recommended.
Note that mobile GPUs have poor support for compute shaders across the board, so using compute shaders on mobile is not recommended.请注意,移动 GPU 对计算着色器的全面支持很差,因此不建议在移动设备上使用计算着色器。
Compute Shader works on my phone, just not with .godot for pc.Could this be a problem caused by different vulkan versions?
Does it work for these features though? Supporting it isn't a question of all or nothing
Does it work for these features though? Supporting it isn't a question of all or nothing它对这些功能有效吗?支持它不是全有或全无的问题
My English is poor, can you speak more clearly?
Maybe there are features that are used that android does not support, but other compute shaders do not use
Maybe there are features that are used that android does not support, but other compute shaders do not use可能有使用android不支持的功能,但其他计算着色器不使用
Ah, Compute Shader is fully available on my phone, including the official demo (https://github.com/godotengine/godot-demo-projects/tree/master/misc/compute_shader_heightmap) and my own noise map generation , the actual problem is that the res files compiled by glsl do not have cross-platform functions (maybe it is a vk version problem?), and the res files generated by pc cannot be used on Android, and only the res files generated by the Android editor can be used.
Are you using Forward+
or Mobile
when exporting from PC?
Are you using
Forward+
orMobile
when exporting from PC?从 PC 导出时,您使用的是Forward+
还是Mobile
?
I have tried it all, and it seems to have no effect on the res file. The res files generated by the pc editor and the pe editor are inconsistent even under the same rendering backend (you can see a slight size difference in the screenshot)
Also the file size only differs by 8 bytes, which could be just two to eight unicode letters
Also the file size only differs by 8 bytes, which could be just two to eight unicode letters此外,文件大小仅相差 8 个字节,可能只是两到八个 unicode 字母
The project and files used by pc editor and pe editor are the same, only the platform, absolute path and vulkan version are inconsistent.
Note that mobile GPUs have poor support for compute shaders across the board, so using compute shaders on mobile is not recommended.
Is this something that can be worked around on the project or engine level, or is it an unavoidable limitation depending on the phone's GPU?
Is this something that can be worked around on the project or engine level, or is it an unavoidable limitation depending on the phone's GPU?
It's due to the graphics driver, which you have no control over as an application developer. It's possible for users to sideload graphics drivers for some GPUs on Android, but this is not allowed when shipping apps on Google Play.
Godot version
4.0.2
System information
PC: MANJARO-6.1.26 GTX1650 PE: HarmonyOS-3.0 Huawei Kirin980
Issue description
When exporting Compute Shader project to Android, I found that glsl failed to load, but importing the project to Android editor works fine, I found the gap lies in . /godot/imported, after replacing the Compute Shader res file in apk with the res file generated by Android editor, the app can be used normally.
PC: PE: There is a significant size difference in the res file, and I don't know if this is related to the problem.
Steps to reproduce
Minimal reproduction project
https://github.com/godotengine/godot-demo-projects/tree/master/misc/compute_shader_heightmap