ScriptReference/Graphics.DrawTexture #23
Replies: 1 comment
-
|
If providing your own Material - it will not be clipped under other GUI elements. sampler2D _GUIClipTexture;
uniform float4x4 unity_GUIClipTextureMatrix;
struct v2f {
float2 clipUV : TEXCOORD1;
}
v2f vert (appdata_t v) {
float3 eyePos = UnityObjectToViewPos(v.vertex);
o.clipUV = mul(unity_GUIClipTextureMatrix, float4(eyePos.xy, 0, 1.0));
}
fixed4 frag (v2f i) : SV_Target {
col.a *= tex2D(_GUIClipTexture, i.clipUV).a;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ScriptReference/Graphics.DrawTexture
https://docs.unity3d.com/ScriptReference/Graphics.DrawTexture.html
Beta Was this translation helpful? Give feedback.
All reactions