We are developing a motorbikes racing game under Unity 5.3.4p4 for Android.
I have a spotlight attached to a gameobject (the motorbike), the farther it is from the center of the world (0, 0) the more unstable/shaking it becomes when moving. I've tested on many devices with different GPU and Android versions but this only happens in Samsung Galaxy Edge S6 and S7 devices (MALI GPU).
Does anyone has the same problem or know any solution for this?.
Thanks for your time.
EDIT:
After a lot of testing there seems to work fine only using Deferred instead of Forward rendering and enabling OpenGLES3, at least for the S7, the S6 has the same problem no matter what I do.
I've also tried downgrading to Unity 5.2.5 and upgrading to unity 5.3.5 without success.
As #Paul-Jan says, it seems it also affects iOS: https://community.unity.com/t5/Graphics/Problems-with-spotlight-on-mobile-precision-issue/td-p/2473711
Related
Launching GVRDemo scene using Unity5.4.2f2-GVR13 installation package I'm experiencing unsteady tracking on my Samsung Galaxy S7. As you can see on an attached video it's not caused by low frame rate nor any of my code since the only thing I've changed in the scene is switching the cubeRoom object with a textured sphere object which better visualises the issue:
https://youtu.be/_NRQNbtdpuI
It doesn't matter if I change the quality setting from Fantastic to Fastest.
As you can see the frame rate doesn't drop around the stuttering moments, so it's not about the CPU/GPU performance
As I test the Google Street View app for example, there's no such issue – is it because it's been written natively for Android?
On the other hand I've noticed games like VR Fantasy with tracking system behaving differently – more smoothly due to the delay in the reaction time regarding the device's movement (looks nice, but causes nausea after 5 seconds). This makes me believe there is an issue with Google VR tracking.
Is anyone experiencing the same thing? What might be the reason for it?
I am also testing a simple VR app made with Unity (5.6b9), and i'm finding that Android performance is rather poor. This is the case on cheap phones (Moto G, $150) as well as fancy phones (Nexus 5X, Asus ZenFone 3) and even expensive phones (Samsung S6).
I'm particularly puzzled by how poor the performance of a VERY simple VR app made with unity is (empty scene, a cube and a sphere, no special lighting, single pass rendering...). The Samsung S6 performes very well with native GearVR apps, or photos/videos. All the phones perform very well with things like street view or youtube.
The same unity app running on iOS outperformer all the androids by a wide margin.
Are there some tricks we're not aware of for getting performance out of android?
I'm using Unity5.4.2f2-GVR13 too, and I think it's just random.
Charging up your phone and controller, and rebooting the phone seems to help a lot.
I'm developing a mobile game which needs WebGL to perform well, however WebGL only works on certain devices.
I have a Nexus 10 tablet updated to the most recent Android Lollipop.
My game uses WebGL when I run it from Chrome, however when I package the game using cordova the game doesn't use WebGL and is very slow. I've tested the behavior on several other devices as well:
WebGL Works:
Samsung Galaxy S5 (4.4.4)
Blackberry Priv (6.0.1)
WebGL Doesn't work
Nexus 10 (5.1.1)
Samsung Galaxy S3 (4.3)
iPad mini 1 (9.3.5)
Samsung Galaxy Tab 3 (4.4.2)
I've also tried using CrossTalk but the app it created never starts. After the splash screen it has black background and nothing happens.
How can I fix or debug the issue that WebGL doesn't work on certain devices?
I managed to make it work, The main reason for not using WebGL is some devices that doesn't have a certain feature in the GPU is by default disable WebGL. The only way to force using WebGL, you will need to use CrossWalk and at same time ignore gpu blacklist.
First I added CrossWalk plugin using the following command:
cordova plugin add cordova-plugin-crosswalk-webview
Then I modified the config.xml to contain this part
<preference name="xwalkCommandLine" value="--ignore-gpu-blacklist" />
Also I signed the APK for release and that made the App work.
Adding this preference forced my Nexus 10 to use WebGL and its super fast.
Also CrossWalk is very fast and made the app work better on my new BlackBerry Priv.
card.io SDK for android integrated in my app works on different devices but on Galaxy S5 it does not come to "snap" after focusing around the camera. I know S5 has quite a different CPU and GPU and some different camera properties. Anyone having the same experience?
Solved thanks to comment from tomwhipple above: just adding "android:hardwareAccelerated="false"" does the trick.
I've made a game that uses OpenGL 1.0 on Android. It works fine on my Android 2.3 phone but displays a black screen on my nexus 7 (now Android 4.4). The music and sound seem to be working fine just the display is black. I'm wondering what the possible issues could be. This is hard to debug because there are no error messages that I can see. Any suggestions on how to debug this?
Maybe too old question. But I met same issue on Nexus 7 first generation.
I rescaled all textures to size power of 2 like 128x128, 256x256, 512x512 etc. and problem got solved.
At glowscript.org are various demo programs written in JavaScript or CoffeeScript that involve little code.
For example, the one-line program box() creates a 3D cube that can be rotated and zoomed, thanks to many defaults (which can be overridden), including basic lighting (two distant lights and some ambient lighting).
Problem:
These programs run fine in many browsers on Windows, Mac, and Linux, but in Firefox on the Samsung Galaxy S3 they are very dark. The appearance indicates that ambient light works (increasing it makes the scene bright) but the distant lights don't work (no difference with them on or off). I've tried running some WebGL demos found on the web and they look fine.
Can anyone think of where I should look for the problem? Why should the behavior be so different between desktop/laptop behavior and what happens on the Galaxy S3?
I fixed the problem on the Galaxy smartphone and added the following to the GlowScript help:
"Most tablets and smart phones do not yet support WebGL, though this is likely to change. On the Samsung Galaxy S3 smartphone, Firefox and Opera do run GlowScript programs, though animations are slow, transparency is buggy, and currently there is no way to zoom and rotate. There are reports that GlowScript also works on the Sony Experia smartphone."
The problem was that the Galaxy shader compiler does not handle for loops correctly. In the fragment shader there was a for loop over the various lights (up to 8 lights). Variables set in the for loop were often set to zero instead of to the specified value. The solution consisted of replacing the loop with a straight-line structure like this, where LP(i) and LC(i) are light positions and colors:
if (light_count == 0) return;
calc_color(LP(0), LC(0));
if (light_count == 1) return;
calc_color(LP(1), LC(1));
if (light_count == 2) return;
etc.
Yuck. Fortunately we only have to support a finite number of lights.