TA/Unity2020. 7. 7. 11:31

v2f o;
    o.pos = UnityObjectToClipPos(v.vertex);

    float time = _Time;


    // Pivot
    float2 pivot = float2(0.5, 0.5);

 

    // Rotation
    float cosAngle = cos(_A_Rotate_Speed * time);
    float sinAngle = sin(_A_Rotate_Speed * time);
    float2x2 rot = float2x2(cosAngle, -sinAngle, sinAngle, cosAngle);

 

    // Rotation pivot
    float2 uv = v.texcoord.xy - pivot;
    o.uv_A.xy = mul(rot, uv);
    o.uv_A.xy += pivot;

 

    //Flow
    o.uv_A.xy += float2(time *_A_FlowX, time *_A_FlowY);

Posted by 프리랜서 디자이너