Welcome,
Guest
. Please
login
or
register
.
April 20, 2026, 06:48:20 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
[UIPanel] Circular clipping view
« previous
next »
Print
Pages: [
1
]
Author
Topic: [UIPanel] Circular clipping view (Read 7063 times)
cayou
Jr. Member
Thank You
-Given: 3
-Receive: 3
Posts: 90
[UIPanel] Circular clipping view
«
on:
January 18, 2013, 01:16:47 PM »
Hi everybody,
I was wondering if it could be possible to create a circular clipping view (only by Hard/Alpha clipping, not soft) rather than a rectangle one.
This could be great !!
Thanks,
Loic.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: [UIPanel] Circular clipping view
«
Reply #1 on:
January 19, 2013, 01:38:47 AM »
You could do this by using a texture instead of specifying a matrix like NGUI does. It involves writing your own shaders, however.
Logged
cayou
Jr. Member
Thank You
-Given: 3
-Receive: 3
Posts: 90
Re: [UIPanel] Circular clipping view
«
Reply #2 on:
January 21, 2013, 04:54:34 PM »
I managed to solve this using depthmask and circular mesh, kinda dirty but it works...
Thank you anyway !
Logged
PoN
Full Member
Thank You
-Given: 1
-Receive: 4
Posts: 111
Re: [UIPanel] Circular clipping view
«
Reply #3 on:
January 23, 2013, 07:17:51 AM »
could you share your solution?
Logged
Worked on
Doc&Dog
,
Age Of Fury 3D
. Actually working on
WarMach
.
cayou
Jr. Member
Thank You
-Given: 3
-Receive: 3
Posts: 90
Re: [UIPanel] Circular clipping view
«
Reply #4 on:
January 23, 2013, 10:48:58 AM »
I'm using this shader:
http://wiki.unity3d.com/index.php/DepthMask
And I apply it to a circle mesh. This mesh is a square place with an circular hole on it. It could be any different shape, like a star for example.
If you combine it with a UIPanel hard clipping (same size as the mesh square), it will give you the illusion of circular hard clipping.
Of course it doen't work with soft clipping, cause of the shader (display pixel or not, 0 or 1).
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
[UIPanel] Circular clipping view