- Home /
How to make Custom Clipping in NGUI
In Unity, especially in UIPanel in NGUI, there is a feature to do clipping (Hard clipping, soft clipping, and alpha clipping). But all of them are based on rectangular shape. So the bound is rectangle. What I want is to make clipping with bound/shape polygon. Can I achieve that? I thought I have to write my own custom shader, but unfortunately I am a newbie in Unity. So can someone give me a hint the logical step of those steps? I don't know where to start.
I attached the effect clip I want. The left, is without clipping. And the right is with clipping. The star is a parent which has some clipping shader. And the child inside it will be clipped with the parent's bound.
Thank you
@bangau1 if an answer solves your problem, don't forget to tick it as correct :)
Answer by vexe · Oct 02, 2013 at 11:41 PM
Currently, you can't. But with the new UnityGUI system which will be actually based on NGUI, you can. See this video right here (@19:48), where ArenMook actually shows that feature, as a part of the coming UnityGUI. I don't know if he'll do that in an NGUI 3.x release. But currently with NGUI 3.0.1, it's not there.
Your answer
Follow this Question
Related Questions
Shader problem with Droid X2 and soft clipping 2 Answers
A node in a childnode? 1 Answer
How Add NormalMap 0 Answers
What is the most common shader model (2.0+,3.0+,4.0+) for unity web player users (or an average) 1 Answer
Is it possible to render a solid color where the Camera clips to the Near Clipping Plane? 1 Answer