Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this technique compatible with mobile platforms? #25

Open
tunchasan opened this issue Apr 30, 2022 · 3 comments
Open

Is this technique compatible with mobile platforms? #25

tunchasan opened this issue Apr 30, 2022 · 3 comments

Comments

@tunchasan
Copy link

I developed a sample project with uRaymarching. There is no problem with PC. But, when I built project for mobile platform, i receive 5-10 fps. I also receive color problem. Character that i applied the shader turns black on mobile platform.

That's my project link : https://github.com/tunchasan/Blob-Runner3D-Clone

This is the shader : https://github.com/tunchasan/Blob-Runner3D-Clone/blob/main/Assets/_Main/Shader/TransformProvider.shader

I'm looking for some help :)

@tunchasan tunchasan changed the title Is this tecnique compatible with mobile platforms? Is this technique compatible with mobile platforms? Apr 30, 2022
@hecomi
Copy link
Owner

hecomi commented May 2, 2022

Raymarching is a very heavy technique. To make it work well on mobile, the per-pixel load needs to be reduced.

  • Reduce the complexity of the formula
  • Reduce the number of loops (Loop)
  • Increase the Minimum Distance so that the loop finishes faster
  • Reduce the resolution of the rendering buffer (uRaymarching does not support this)

And I ran the sample scenes in uRaymarching on Android and both Forward / URP (Forward) worked fine. Could you try the same?

@tunchasan
Copy link
Author

tunchasan commented May 3, 2022

Thank you for your support. I made remarkable optimization progress for mobile. I followed your instructions and got result. But there are still a few issue that I need to handle. I have tested project new version on Android Devices, BlueStack Android Emulator and IOS. The project run on IOS without any problem. But, there is an interesting case between BlueStack Android Emulator and Android devices. I simulated the project with very low Android device settings on BlueStack Android Emulator with 40-50 fps. Here is the interesting thing, when I run the project on Android device which has very high capabilities than the BlueStack Android Emulator, I get 1-5 fps.

I got screenshots from IOS, Android Device and BlueStack Android Emulator. I noticed the Shader Level. The shader level is 35 on BlueStack Android Emulator. Even I keep same settings, the shader level is 50 on Android Devices.

Note : I also shared the Device's hardware specifications on bottom the images.

BlueStack Android Test

BlueStack Test

Android Test - 1

Android Test 1

Android Test - 2

Android Test 2

IOS Test

IOS Test

@hecomi
Copy link
Owner

hecomi commented May 5, 2022

1 fps seems too slow... It might be a good idea to connect Profiler to analyze to see if the graphics are really the cause.
(For example, the FPS often drops noticeably in cases where a lot of error messages are output.)

Of course, differences in Shader Level may also have an indirect effect, but I have no idea at this time... 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants