How to overlay a texture on a polygon not based on UVs?

Looking for a nudge in the right direction.

First of all, I’m not sure what graphics/shader terms I should be using to describe what I’m trying to do. What I would like to is overlay a texture onto an arbitrarily shaped UI polygon that has vertices that will change positions at runtime without distorting the texture. So it would have to be done without UVs.

I’m not sure if that is very clear but here is an illustration of what I would like to accomplish:

On the right is the texture, on the left is the polygon that I would like the texture applied to.

If I can answer any questions that would provide further clarification, please ask. Thank you

Alrighty, so the term that I was looking for is “screen space”.

I’ve modified the Default UI shader to apply the texture based on the screen space position of the pixels. This works with tileable textures.

The problem as you can see in the above screenshot is the texture isn’t moving with the object. How can I add/subtract the object’s position from IN.screenPos in the shader below to compensate for that?

Shader "UI/ScreenSpaceTexture"
{
    Properties
    {
        [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
        _Color ("Tint", Color) = (1,1,1,1)
       
        _StencilComp ("Stencil Comparison", Float) = 8
        _Stencil ("Stencil ID", Float) = 0
        _StencilOp ("Stencil Operation", Float) = 0
        _StencilWriteMask ("Stencil Write Mask", Float) = 255
        _StencilReadMask ("Stencil Read Mask", Float) = 255

        _ColorMask ("Color Mask", Float) = 15
       
        _Tiling ("Tiling", Float) = 0
    }

    SubShader
    {
        Tags
        { 
            "Queue"="Transparent" 
            "IgnoreProjector"="True" 
            "RenderType"="Transparent" 
            "PreviewType"="Plane"
            "CanUseSpriteAtlas"="True"
        }
       
        Stencil
        {
            Ref [_Stencil]
            Comp [_StencilComp]
            Pass [_StencilOp] 
            ReadMask [_StencilReadMask]
            WriteMask [_StencilWriteMask]
        }

        Cull Off
        Lighting Off
        ZWrite Off
        ZTest [unity_GUIZTestMode]
        Blend SrcAlpha OneMinusSrcAlpha
        ColorMask [_ColorMask]

        Pass
        {
        CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #include "UnityCG.cginc"
           
            struct appdata_t
            {
                float4 vertex   : POSITION;
                float4 color    : COLOR;
                float2 texcoord : TEXCOORD0;
            };

            struct v2f
            {
                float4 vertex   : SV_POSITION;
                fixed4 color    : COLOR;
                half2 screenPos : TEXCOORD1;
            };
           
            fixed4 _Color;
            fixed _Tiling;

            v2f vert(appdata_t IN)
            {
                v2f OUT;
                OUT.vertex = UnityObjectToClipPos(IN.vertex);
                OUT.screenPos = ComputeScreenPos(IN.vertex); 
#ifdef UNITY_HALF_TEXEL_OFFSET
                OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1);
#endif
                OUT.color = IN.color * _Color;
                return OUT;
            }
             
            sampler2D _MainTex;

            fixed4 frag(v2f IN) : SV_Target
            {
                half4 color = tex2D(_MainTex, IN.screenPos * _Tiling * .001) * IN.color;
                clip (color.a - 0.01);
                return color;
            }
        ENDCG
        }
    }
}

If there is anything I can do to improve this modification, please let me know.