- Home /
Lighting differencies between desktop and android.
This happened only this time.
In my unity project player my scene looks like this:
When I start on my android application it looks like this:
There is only terrain, camera and directional light in scene.
The only value that I changed is light intensity.
It might be an OpenGLES compatibility problem, i.e. maybe your Android device doesn't support OpenGLES3, and somehow the automatic setting sets it to OpenGLES3, ins$$anonymous$$d of OpenGLES2. In your Player Settings, in the "Other Settings" section check to see if you have "Auto Graphics API" enabled. If yes, disable it and select and remove OpenGLES3. Then build and try again.
I have made it. It become even worse. Now Ins$$anonymous$$d of being dark gray now it is black. As there is no light sources at all.
Are you using any special shaders for the terrain that need OpenGLES3, but your device does not support OpenGLES3? What device and Android version do you have for testing?
For terrain, I have created Physics$$anonymous$$aterial and added simple grass texture. $$anonymous$$y device is Redmi Note with Android 4.4.2
With your device there should be no problem with OpenGLES.
How did you paint the grass? Did you use "Add Grass Texture" in the Terrain's settings/Paint Details/Edit Details? If so, a huge amount of of vertices may have been created in the scene for the grass, and these would have difficulty rendering in a mobile device. Check your "Stats" when in Play mode.
There is no grass in this terrain. When I said that I added "grass texture" is that I have added texture image named "grass" to terrain :) . The most interesting is that this happes only for my terrain while other 3D objects like cube, cylinder with textures works fine.
It is looks like as if light source's color is black, but color of my light source is white.
Is this could be considered as bug?
$$anonymous$$orrow I will try to run this project on my friends device.
I'm not quite sure what you mean by "added simple grass texture". You can't just "add" texture to terrain and have it rendered. You add it, and then paint the terrain with it with the terrain tools. So, please be specific with the actions you have taken.
Also, I must say, that the images you have posted show a "shiny" surface, with some areas with more light and some areas with shades. These would require a special shader. maybe I'm wrong, but I just can't see how such effects could be achieved by just painting the terrain with a simple texture.
If you posted some screenshots of your hierarchy, and the Inspector for the terrain object.
Of course if you try it on a different Android device it could probably be useful.
O$$anonymous$$, I see what you mean... The first texture you add to the terrain, automatically covers the whole terrain. You only need to paint the remaining textures you add (if any).
Another thought: In the import settings of the texture, try setting the texture format to "Truecolor" if it is "Compressed". Also make sure that in your "Build Settings" the "Texture Compression" is set to "Don't override".
I have launched this project on my friends device which is THL 5000. It shows terrin fine. I think this is problem of hardware of my phone.
Answer by Jespertheend2 · Oct 03, 2015 at 08:13 PM
Try replacing all 'fixed' words with 'half' in your shader, if that doesn't work try replacing 'half' with 'float' if that doesn't work it's probably a problem with your graphics card not supporting something in your shader.
Where I can find these options? I do not use any custom shaders. It is simple new Unity Project.
If you have a custom shader it's somewhere in your assets folder. If this is the standard shader you might have to change it to another shader that is more mobile friendly. What shader do you have selected in your material settings?
On my terrain in $$anonymous$$aterial, there is "Build in Standard" selected. However, when I switch to "Build in Legacy Standard" my terrain looks black in my phone.
Your answer
![](https://koobas.hobune.stream/wayback/20220612035857im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity can't build my Android project 0 Answers
Camera.main.WorldToScreenPoint(touch.position). Help !!! 1 Answer
Multiple Cars not working 1 Answer
Image Effect lighting 0 Answers
Trying to change a texture with picture from camera 3 Answers