-
Notifications
You must be signed in to change notification settings - Fork 13
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
Perlin and simplex noises (fbm) gets abruptly cut off on Android devices. #1
Comments
Sure: using Chrome/90.0.4430.210 on a stock ROM. It's the first time I'm witnessing something like this happening, for example this noise shader works fine on the device https://www.shadertoy.com/view/Msf3WH |
I’ll investigate |
Can you try running a more complex shadertoy? Maybe this one: https://www.shadertoy.com/view/tsXBzM |
Sure, here's the screenshot: Video capture: https://webm.red/view/X6pI.webm |
I do not own an android device. I will work with a friend to get this resolved. However, in the meantime you can fork this repo and host the example locally, then access it with your phone, then try to change the resolution of the plane to something smaller. See if that fixes it? |
We have narrowed it down to Line 76 in 162049e
When turbulence is set to true, hence taking the absolute value of the noise, it renders fine. Seems to cause issues when turbulence is set to false. Also, RIdge noise seems to work. Device: Oneplus Nord, Android 12, Chrome |
This comment comes a bit late, I've forked the repo and tested yesterday as you asked but with no luck. Set the turbulence to false solves the issue on the phone but the ridge noise doesn't have, well, ridges anymore :/ I found other people experienced the same issue here: https://stackoverflow.com/questions/41142911/inaccurate-shader-precision-on-android-compared-to-webgl However changing the precision to highp doesn't solve the problem, or I am editing the wrong file, unfortunately my knowledge of glsl is very limited and close to none, so I am not quite sure where/what to change. |
glNoise already uses high precision floats Line 6 in 162049e
You can try changing this line to use Remember to rebuild the library after you edit the file with If that doesn’t fix it then the issue might be with the FBM functions. Can you try replacing the fBm functions with another implementation you find online? Thank you for helping out 😄 |
Update: glNoise no longer specifies the precision. it is left to the user. However, this issue still seems to persist. Will leave this open as I do not have a device that the bug affects. |
As per title, looks like the lower heights for perlin and simplex noises gets all cutted off on mobile devices.
Ridge noise does not work at all (displays a black plane if I switch on 2d mode)
Using a OnePlus 6T with Android 10
The text was updated successfully, but these errors were encountered: