-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Precision-induced lighting failure on large objects on Android devices with Vulkan mobile renderer (solution provided) #86275
Comments
The same bug happens on 4.2 official build, just tested. |
Suggested by @clayjohn, copying here from chat so as to not to lose: clayjohn11:27 PM clayjohn11:28 PM |
The bug appears to be affecting unshaded materials with https://youtu.be/oILRIk3NxGU?si=ogyDSYxLFif3M804 This is not related to near/far plane distances, because they do not affect this bug. |
Some more, shows both lighting and blend_add fresnel material: https://youtu.be/9AVLGC-C2-I?si=wsHlsaOSfbtplzsD Motorola moto g(60), Adreno 618 |
SolutionIncrease precision in fragment shader for |
@roalyr can you make a PR ? |
I am sorry, I am in a poor state of mind as of late, please don't rely on me. I know you are doing important work on mobile renderer there, but I am not able to contribute these days. |
No worries, take care |
Solution
Increase precision in fragment shader for
normal_interp
roalyr@c26f7ac
Tested versions
4.x as of 2d0ee20 and official Android 4.2 build.
System information
Lenovo TB350FU, ARM Mali-G57 MC2 and Motorola moto g(60), Adreno 618, all in Vulkan mobile mode.
Issue description
On large 3D objects omni light either ceases to render at all, if an object is above some certain scale (Motorola), or is rendered with bugs (Lenovo). On GLES3 renderer everything works fine, same goes for desktop (both Forward+ and Mobile renderer).
Also the bug seems to affect
blend_add
fresnel shaders.Intended look (on desktop):
Links to videos showing the bug:
https://imgur.com/a/fSqghHU
https://imgur.com/a/MGLpjvq
https://youtu.be/9AVLGC-C2-I?si=wsHlsaOSfbtplzsD
Remarks:
Steps to reproduce
Open test scene and navigate the view. Try gradually scaling down the models to see the threshold at which omni light starts to misbehave.
Or just create an empty 3D scene, add a spherical model and gradually scale it up.
Minimal reproduction project (MRP)
The test scene itself: test.zip
(Should be opened on a mobile device with Android editor build because the scale is around 1e6-1e7 units, so it requires editor with larger z-far cap and double precision)
The text was updated successfully, but these errors were encountered: