Author Topic: Weird transparency sorting problem with new NGUI  (Read 2195 times)

enzi

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 21
    • View Profile
Weird transparency sorting problem with new NGUI
« on: May 02, 2014, 04:54:03 PM »
Hey Tash!

I recently upgraded from 3.0.6 f1 Ngui to the latest (3.5.8).

There was no problem with NGUI itself but my quad rendering was suddenly screwed up. Here's a screen:


First I thought, NGUI can't be the problem here, but I reverted back and forth to the old version and it was always the same result. Old worked, new one doesn't
I use a custom shader for quads, no NGUI stuff used.

So do you know, if there's anything that could interfere with this?

Thanks in advance

enzi

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 21
    • View Profile
Re: Weird transparency sorting problem with new NGUI
« Reply #1 on: May 02, 2014, 05:03:45 PM »
Omg, I'm looking 4 hours into this and after writing this I found the solution 5 minutes after. Typical, isn't it?

I explicitly set the camera now to

  1. camera.transparencySortMode = TransparencySortMode.Orthographic;

This solves the issue. That the issue didn't occur in the old version perplexes me still, but at least it's solved.

Greetings

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Weird transparency sorting problem with new NGUI
« Reply #2 on: May 04, 2014, 10:31:04 AM »
NGUI does it for you on line 941 of UICamera.cs, but the event type must not be set to "world".