Author Topic: "Shader wants normals" error but panel / shader is correct  (Read 3027 times)

traderjoe

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 3
    • View Profile
"Shader wants normals" error but panel / shader is correct
« on: July 15, 2014, 12:11:56 AM »
I'm getting a constant error in the console of "Shader wants normals, but the mesh UIAtlas doesn't have them" however all but one of my panels has "Normals" unchecked and the shader on the atlas is set to Unlit / Transparent Colored.

However, I do have a single panel that I want lit and it's "Normals" box is checked and the atlas created for just that panel has its shader is set to Transparent/ Difuse. No widgets or panels of the unlit atlas are a child of the lit panel and it only contains a single widget of the lit atlas.

Looking at the lit example there shouldn't be any problems mixing unlit and lit panels as long as the atlas widget stay separate. Any ideas? 

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: "Shader wants normals" error but panel / shader is correct
« Reply #1 on: July 15, 2014, 12:45:15 AM »
Happens sometimes when you search for something in the hierarchy window. Clear the search field.

traderjoe

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 3
    • View Profile
Re: "Shader wants normals" error but panel / shader is correct
« Reply #2 on: July 15, 2014, 02:47:07 AM »
Clearing the search field didn't do anything. I've also recreated the atlas, reinstalled ngui (running the latest version), and restarted Unity.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: "Shader wants normals" error but panel / shader is correct
« Reply #3 on: July 15, 2014, 08:19:11 PM »
Well, not sure what to tell you then. That message will show up if you are using a shader that needs normals, but the panel is set to not generate them.

I just did a simple test:

1. New scene.
2. ALT+SHIFT+T, chose a Brick texture and Brick material. I saw the same message at this point.
3. Selected UIRoot, checked the "normals" checkbox, message went away.
4. Added a lightsource to verify that the widget is now lit. It was.

The only explanation for this in your case remaining is that you forgot something. You likely have something else using a non-unlit shader.