tonynogo

Demo 96 - UV rotation with matrix

Jul 6th, 2017
18,669
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Shader "Custom/UV rotation"
  2. {
  3.     Properties
  4.     {
  5.         _MainTex ("Texture", 2D) = "white" {}
  6.         _Angle ("Angle", Range(-5.0,  5.0)) = 0.0
  7.     }
  8.     SubShader
  9.     {
  10.         Tags { "RenderType"="Opaque" }
  11.        
  12.         Pass
  13.         {
  14.             CGPROGRAM
  15.             #pragma vertex vert
  16.             #pragma fragment frag
  17.             #include "UnityCG.cginc"
  18.  
  19.             struct v2f {
  20.                 float4 pos : SV_POSITION;
  21.                 float2 uv : TEXCOORD0;
  22.             };
  23.  
  24.             float _Angle;
  25.  
  26.             v2f vert(appdata_base v)
  27.             {
  28.                 v2f o;
  29.                 o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
  30.  
  31.                 // Pivot
  32.                 float2 pivot = float2(0.5, 0.5);
  33.                 // Rotation Matrix
  34.                 float cosAngle = cos(_Angle);
  35.                 float sinAngle = sin(_Angle);
  36.                 float2x2 rot = float2x2(cosAngle, -sinAngle, sinAngle, cosAngle);
  37.  
  38.                 // Rotation consedering pivot
  39.                 float2 uv = v.texcoord.xy - pivot;
  40.                 o.uv = mul(rot, uv);
  41.                 o.uv += pivot;
  42.  
  43.                 return o;
  44.             }
  45.  
  46.             sampler2D _MainTex;
  47.  
  48.             fixed4 frag(v2f i) : SV_Target
  49.             {
  50.                 // Texel sampling
  51.                 return tex2D(_MainTex, i.uv);
  52.             }
  53.  
  54.             ENDCG
  55.         }
  56.     }
  57. }
Advertisement
Comments
  • Xenfizon
    48 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • Zarnulix
    41 days
    # CSS 0.06 KB | 0 0
    1. We just shared HQ data on our channel: https://t.me/theprotocolone
Add Comment
Please, Sign In to add comment