Author Topic: Understanding the Unlit/Transparent Colored (SoftClip) shader  (Read 2255 times)


  • Guest

I'm trying to figure out where you store the clipping data in the texture you use with the Unlit/Transparent Colored (SoftClip). My goal is to be able to make a clipping mask with a different shape than the basic rectangle.

So far, I've found that it has something to do with :

  1. o.worldPos = TRANSFORM_TEX(v.vertex.xy, _MainTex);

If I invert x and y, the clipping is also inverted.

Why do you get another set of UVs based on the vertex in local position? Is there a way to inspect the texture created at runtime in order to see the extra information? Thank you


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Understanding the Unlit/Transparent Colored (SoftClip) shader
« Reply #1 on: May 17, 2013, 01:18:45 AM »
The data is passed as a texture matrix, which is why you see TRANSFORM_TEX happening.