Shader "Ageia/ImageEffect/Glitch" { Properties { //_GlitchChanger("GlitchChanger", Range(0, 1)) = 0 _GlitchAmount("GlitchAmount", Range(0, 1)) = 1 [NoScaleOffset]_GlitchTex("GlitchTex", 2D) = "white" {} _GlitchColor1("GlitchColor1", Color) = (1, 1, 1, 1) _GlitchColor2("GlitchColor2", Color) = (1, 1, 1, 1) _GlitchColor3("GlitchColor3", Color) = (1, 1, 1, 1) _GlitchCutAmountX("GlitchCutAmountX", Range(0.1, 10)) = 1 //๊ธ๋ฆฌ์น ์๋ฆฌ๋ ์. _GlitchCutAmountY("GlitchCutAmountY", Range(0.1, 10)) = 1 //๊ธ๋ฆฌ์น ์๋ฆฌ๋ ์. } SubShader { Tags { "RenderType"="Transparent" "Queue" = "Transparent" } LOD 200 GrabPass{} CGPROGRAM // Physically based Standard lighting model, and enable shadows on all light types #pragma surface surf NoLighting noshadow noambient novertexlights nolightmap nodynlightmap nodirlightmap nofog nometa noforwardadd nolppv noshadowmask halfasview // Use shader model 3.0 target, to get nicer looking lighting #pragma target 3.0 sampler2D _GrabTexture; sampler2D _GlitchTex; struct Input { half4 screenPos; half2 uv_GlitchTex; }; fixed4 _Color; //half _GlitchChanger; half _GlitchAmount; half3 _GlitchColor1; half3 _GlitchColor2; half3 _GlitchColor3; half _GlitchCutAmountX; half _GlitchCutAmountY; // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. // See https://docs.unity3d.com/Manual/GPUIn... for more information about instancing. // #pragma instancing_options assumeuniformscaling UNITY_INSTANCING_BUFFER_START(Props) // put more per-instance properties here UNITY_INSTANCING_BUFFER_END(Props) void surf (Input IN, inout SurfaceOutput o) { half3 screenUV = IN.screenPos.xyz / IN.screenPos.w; //half Test = IN.uv_MainTex; half GlitchUV = tex2D(_GlitchTex, half2(IN.uv_GlitchTex.x * _GlitchCutAmountX + (_Time.y * 100), IN.uv_GlitchTex.y * _GlitchCutAmountY + sin(_Time.y * 100))); half UV = GlitchUV * _GlitchAmount; half GlitchAmountFinal = saturate(_GlitchAmount * 10); // Albedo comes from a texture tinted by color fixed3 r = tex2D (_GrabTexture, half2(screenUV.x + UV, screenUV.y)).r * lerp(fixed3(1, 0, 0), _GlitchColor1, GlitchAmountFinal); //๋ ๋๊ฐ ์ฒ๋ฆฌ fixed3 g = tex2D (_GrabTexture, half2(screenUV.x - UV, screenUV.y)).g * lerp(fixed3(0, 1, 0), _GlitchColor2, GlitchAmountFinal); //๊ทธ๋ฆฐ๊ฐ ์ฒ๋ฆฌ fixed3 b = tex2D(_GrabTexture, half2(screenUV.x , screenUV.y + UV)).b * lerp(fixed3(0, 0, 1), _GlitchColor3, GlitchAmountFinal); //๋ธ๋ฃจ๊ฐ ์ฒ๋ฆฌ half3 GlitchFinal = r + g + b; //half3 GrabFinal = tex2D(_GrabTexture, screenUV); half3 EffectFinal = GlitchFinal; o.Albedo = EffectFinal; o.Alpha = 1; } half4 LightingNoLighting(SurfaceOutput s, half3 lightDir, half atten) { half4 c; c.rgb = s.Albedo; c.a = s.Alpha; return c; } ENDCG } FallBack "" }
์ฌ์ฉ๋ฒ์ ์ด๊ฑฐ ์์ด๋์ ๋ณต๋ถํด์ ๋จธํ ๋ฆฌ์ผ์ ๋ฃ๊ณ ๋์์ ์ฒ๋ผ ์ฐ๋ฉด๋ฉ๋๋ค.
์๋ง ๋ชจ๋ฐ์ผ์์๋ ์งง๊ฒ ์ฐ์ถ์ฉ์ผ๋ก ์ฌ์ฉํ๋ ์ ๋๋ผ๋ฉด ๊ด์ฐฎ๊ฒ ์ธ ์ ์์๋ฏ.
์ฉ....์ฉ๋น!!
๋ฏธ์ถ๋ค ์ง๊ธ ๊ฒ์์ ์์ฒด๊ฐ๋ฐ ๊ธ๋ฆฌ์น์ดํํธ ์ฐ๊ณ ์๋๋ฐ ๋์ ์ด๊ฑธ๋ก ์จ๋ ๊ด์ฐฎ์๊น?
์ด์ผํ๋ ธ ์จ๋ฐ๋ จใด์
์ธ๊ฒ๊ฐค์ ๋ณด๋ฒ ์ธ ๋ฐ์์
์๋ค ใ ใ
์์ฐ
์ค - dc App
์ ์ฉ๋ค
๊ฐ์ฅ ์ ์ตํ ๊ธ... ๊ทผ๋ฐ ๊ถ๊ธํ๊ฒ ์์ด๋ ์ข ์ ๋ง์ง๋ ค๋ฉด ์ผ๋ง๋ ๊ธฐ๊ฐ ์ก์์ผ๋??
์ด์ผ ์ฐ๋๊ฑฐ์ผ...ใ ์ ๋ ๋ถํ์์ผ๋ก ๋์ค๋