Author Topic: Texture/Sprite Back side.  (Read 4699 times)

vidjogamer

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Texture/Sprite Back side.
« on: April 09, 2014, 07:24:44 AM »
Hello, I know I can change the depth to put one texture/sprite in front of another. I essentially want 2 textures in the same spot, one will represent the front of a card, the other will represent the back of a card. I want to be able to spin the card so you can see both sides. The problem I'm running into is NGUI always displays the lower depth texture on top, even if I'm looking at the back side of my card.

vidjogamer

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Re: Texture/Sprite Back side.
« Reply #1 on: April 09, 2014, 07:56:49 AM »
Ok, so I made the UITexture for the front side of the card have an Unlit shader with Alpha and Backface Culling then I made the side of the card have an Unlit shader WITHOUT backface culling. Now I can see the back side properly as the front side disappears due to backface culling... the only problem with this approach is the UILabels that represent text on the front side of the card still show through on the back side.... and there seems to be no way to set the material for labels?


vidjogamer

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Re: Texture/Sprite Back side.
« Reply #2 on: April 09, 2014, 11:04:35 AM »
Ok, so I solved this by editing the shader on the UIFont prefab that my UILabels reference. I just added "Cull Back". Works like a charm.