[Unity Shader] Sprite Mask

[Unity Shader] Sprite Mask

Mar-21-2017 21-37-52

Here’s mine unity asset package:

https://drive.google.com/open?id=0Bw9c7dcMWLT2ZmVyTTMzcUJaZ3M

 

References:

https://forum.unity3d.com/threads/is-it-possible-to-clip-a-sprite-with-another-sprite.254144/

https://forum.unity3d.com/threads/standard-shader-with-stencil-mask.308433/

https://docs.unity3d.com/Manual/SL-Stencil.html

Advertisements

[Unity Reminder] Tips

OnMouseDown ()
When Parent Object has rigidbody on it, the OnMouseDown () function cannot be detected on the Child Object.

Quaternion.operator *
1) public static Quaternion operator *(Quaternion lhs, Quaternion rhs);
– Combines rotations lhs and rhs.
2) public static Vector3 operator *(Quaternion g_rotation, Vector3 g_point);
– Rotates the point g_point with g_rotation.

Skybox
Texture “Wrap Mode” should be “Clamp”