Author Topic: Texture Mask ignores UIPanel bounds?  (Read 2598 times)

toqueteos

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 13
    • View Profile
Texture Mask ignores UIPanel bounds?
« on: November 03, 2014, 10:34:57 AM »
Hi there,

First off let me explain what I'm trying to achieve, then I'll show my weird results and maybe you can help me.

I want to multiply this image:

Link

On top of this one:

Link

So it looks like this:

Link

This effect is quite easy to do on most image editors, but I'm gonna be using dynamicly loaded images to stamp on top of the "card shape" so doing it with NGUI would be more useful than manually for each image.

This is what I have right now:

Link

I tried creating my own version of "Unlit/Transparent Colored" shader (with an extra texture as input) but it didn't work. I can't get to work any material, even NGUI's default "Unlit/Transparent Colored" shader doesn't work so.. I went the UIPanel Texture Mask route but results are weird.

Any suggestions?



EDIT: I remade the shader: http://hastebin.com/vaniqovoce.cg Still not the effect wanted.
« Last Edit: November 03, 2014, 12:22:39 PM by toqueteos »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Texture Mask ignores UIPanel bounds?
« Reply #1 on: November 04, 2014, 09:36:40 AM »
You need to use a UITexture to draw it. Specify a material that will blend two textures together. It'll be the same as having a normal non-NGUI plane with a material on it.