Author Topic: [Bug] UIPanel clipping problem  (Read 3274 times)


  • Guest
[Bug] UIPanel clipping problem
« on: August 22, 2012, 06:45:31 PM »

I've noticed that clipping stops working when UIPanel extends a certain scale. Details below:

- Unity v. 3.5.5f3
- Ngui v. 2.1.5 (v. 2.0.8 has the same problem)
- I've disabled my scripts that could eventually affect game objects

1.jpg shows when everything is working fine (clipping is enabled for the "Background" panel - Soft Clip (x: -600, y: 0, width: 1500, height: 460; softness x: 100, y:1))
2.jpg shows a state of the game object that is responsible for the failure (but still everything is working fine)
3.jpg shows when I change scale and clipping is gone

As far as I noticed:
- clipping stops between 1.03 and 1.04 scale values.
- tried to apply scale on "Background" panel only - it's the same
- tried to change clipping values but it shows everything or nothing - but not clipped

All sprites are adjusted to 16:10 aspect ratio, but I need to scale some of them to deal with 16:9. I tried to debug Ngui code, but I don't see clipping is disabled. Is it possible that clipping shader fails and it is caused by size of the clipping region?


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: [Bug] UIPanel clipping problem
« Reply #1 on: August 22, 2012, 11:09:07 PM »
Scales must be uniform. All 3 values, X, Y, and Z must match.

This is a limitation in Unity, regarding how it passes the matrix to the shader.


  • Guest
Re: [Bug] UIPanel clipping problem
« Reply #2 on: August 23, 2012, 05:54:36 AM »
Thank you for your answer. Now everything is working fine.