uRaymarching icon indicating copy to clipboard operation
uRaymarching copied to clipboard

Is this technique compatible with mobile platforms?

Open tunchasan opened this issue 2 years ago • 3 comments

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 avatar Apr 30 '22 20:04 tunchasan

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?

hecomi avatar May 02 '22 17:05 hecomi

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

tunchasan avatar May 03 '22 17:05 tunchasan

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... 😢

hecomi avatar May 05 '22 01:05 hecomi