- Home /
Is it possible to change the shader the editor uses?
Most of my meshes have no normals or textures which the default shader uses so every time I select most any mesh in my scene I get the following warnings all the time
Shader wants normals, but the mesh meshName doesn't have them
UnityEditor.DockArea:OnGUI()
Shader wants texture coordinates, but the mesh meshName doesn't have them
UnityEditor.DockArea:OnGUI()
It really spams up the Console and I'd like to fix it. Is there any way to change the default shader or, failing that, to disable those warnings?
Answer by Snoozer · Nov 14, 2013 at 06:14 AM
Hi Kody I got this problem to in my 2d game that have no need for normals.
I seams to be solved by Always include a shader with no normals calculations in the Project.
In Unity: Edit -> Project settings-> Graphics
Size 1 and for example an unlit shader.
Answer by electricsauce · May 26, 2013 at 06:41 AM
The default shader should be a diffuse shader, which requires no normal map. You can either switch the affected materials back to the default diffuse shader, or add a normal map. You can easily add a normal map by duplicating the diffuse and changing the texture type to normal map from grayscale.
Normals and normal maps are different. Normals are part of the model -- they are those little lines that stick out from the verts. They are used in any lit shader. In diffuse they help calculate the "darkening" effect. You'd leave them out of an export to save space if you only have unlit stuff.
A normal map is just a texture you can slap on any model. They look at the real normal and bend it slightly, for the bumpy effect. But the model needs to have real normals in the first place. It's kind of like if a model isn't unwrapped, no texture can help it -- there's nothing for the texture to work with.
Your answer
Follow this Question
Related Questions
Shader does not display properly in game/editor view, but building it works. 0 Answers
How to change editor highlighting behavior? 0 Answers
Shader not refreshing after changes 0 Answers
Gfx.waitForPresent causing massive lag spikes in editor 8 Answers
Shader isn't displaying properly in editor view, but when built it displays properly. 0 Answers