Ssao causes serious lag on mobile

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AlpacaLord

Hi!

I’m making a low poly space game, kinda like Astroneer but for mobile.
I really want to use Ssao in my game because it looks 100x better with it enabled but it makes the game lag.
To activate it I have to set the ‘Framebuffer allocation’ to ‘3D’ in my project quality settings, otherwise you can’t see it ingame.

When I set this to 3D it causes a lot of lag and I don’t know why. This is my second mobile game (first one was 2D) so I don’t have a lot of experience with making mobile games.

Is there another way to do this?

Have you tried using GLES2 for graphics?

Godot supports both GLES3 and GLES2 (and soon Vulkan), and GLES2 is less heavy on mobile.

https://docs.godotengine.org/en/latest/tutorials/misc/gles2_gles3_differences.html

https://www.youtube.com/watch?v=kBRvDLZXiOI

Asheraryam | 2019-11-07 17:56

Mobile performance is a struggle with the current 3D engine. Using GLES2 can help a lot with performance, but I don’t think ssao is supported.
There’s a lot of information here: 3D performance and limitations

andersmmg | 2019-11-07 17:56

Im currently using GLES3 because it looks 100x better then GLES2.

The performance is fine with the effects turned off! The only problem right now is that the fps drops with 20fps with ssao turned on, so I was wondering if there was maybe an alternative :slight_smile:

AlpacaLord | 2019-11-07 18:17

I don’t think there really is. Mobile devices just don’t support more advanced effects well.

andersmmg | 2019-11-07 18:21

This would be the time to write your own shader. :slight_smile:
I found this. Maybe it is of help:
https://weekly-geekly.github.io/articles/204260/index.html

Original article:
SSAO на OpenGL ES 3.0 / Хабр
Source:
GitHub - Torvald3d/Torvald3d-SSAO-OpenGL-ES-3.0

If you succeed then feel free to let us participate. I.e. via a post in godotforums.org.

wombatstampede | 2019-11-08 08:21