Author Topic: UITexture with RenderTexture transparency problem.  (Read 8512 times)

KlingOne

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
UITexture with RenderTexture transparency problem.
« on: November 21, 2016, 05:38:35 AM »
Hi,

in my game I have a camera which is pointed at the characters face and renders into a RenderTexture.
When I try to display that RenderTexture in NGUI via a UITexture I get a weird transparency issue (see screenshot).



One thing to note is that this only happens if the camera is using the forward renderer. Deferred rendering works fine but unfortunatelly isn't an option in WebGL.

Anybody any ideas what may be causing this?

Thx in advance


KlingOne

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: UITexture with RenderTexture transparency problem.
« Reply #1 on: November 21, 2016, 05:42:25 AM »
Somehow the pictures do not display in the original message and I could not finde an edit button.
So I'm posting them seperatly.
Sry.

Problem:


RenderTexture seems fine:

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UITexture with RenderTexture transparency problem.
« Reply #2 on: November 27, 2016, 04:01:10 PM »
That's your shader. Check your rendered texture's alpha channel, then modify whatever shader is used by the face to output alpha of 1, not 0.