- Home /
The question is answered, right answer was accepted
Toon shader mobile issue
Hi there, I have a weird problem, let's see is someone here has an idea of what's happening.
I use Unity Free (latest version).
I'm developing a game for Android.
I use the toon shader than comes with Unity by default (the Basic outline one).
The shader works ok, I use it everwhere and that's ok.
Problem:
I've added a second camera and I've properly configured it for GUI purposes.
It works ok, I add objects to my GUI Layer and this camera renders these objects in front of the main camera.
The problem comes when I add toon shaded objects to my GUI layer in order to be rendered by this camera: the toon outline is shown while playing the game from the editor but is missing when deploying and playing the game form the device
The rest of the toon shaded objects are shown ok, but the outline is lost in the objects that I have in the GUI layer (rendered by the GUI cam) when I play the game in the phone (while in the editor are shown correctly)
I can see that the toon shader is applied to these objects but they have no outline
Any advice?
many thanks!
it's a Huawei Ascend Y300, It's not a powerfull device but I prefer to make the tests with this so I assume that if things go ok here then there will be no problems in better phones
Which version of GLES does the device support? It is in the right mode?
Also, are your textures in a compression format suitable for your Adreno GFX?
Answer by musaranya · Jun 23, 2014 at 01:49 PM
Hi, after tons of test and experiments (some of them senseless) I have found that the missing outline from the toon shader gets visible when I move away the object from the camera. For the GUI I use a camera that renders only a few objects placed in certain layer. These objects are pretty near from this camera and seems it does not like to the toon shader, at least in my mobile device. What has confused me is the fact that it only happens in the mobile but not in the editor. I have solved it putting these objects further from the camera and scaling them a bit.
Thanks @meat5000 for your interest :)
Follow this Question
Related Questions
Modified Toon Shader: scaled instead of projected (how to?) 0 Answers
Any good mobile shaders (pref. free) for a glowing outline effect 0 Answers
Toon Shader Outline Zoom Problem 1 Answer
Outline/Silhouette shader does not work correctly when ported to mobile. 2 Answers
3D Outline [ShaderGraph URP] 2 Answers