You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PlumberUltimateAds/Assets/2DxFX/Resources/2dxfx_AL/_2dxFX_AL_MetalFX.shader

139 lines
3.2 KiB
Plaintext

Squashed commit of the following: commit 761fe0f0e39341baeea362d1a24b85307c6533bf Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 17 17:30:04 2024 +0500 Fixed some spash issues commit a29c5d792ee1e70828ca21d11b1d0e8b57194d3b Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 17 16:57:44 2024 +0500 Fixed Splash issue commit 4000ab25110d0593dfe5ad5eea81a4109a744464 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 17 16:00:08 2024 +0500 fixed spalsh issue commit df377a68259ee183783ce1d898258a26e9f7e6de Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 17 00:59:51 2024 +0500 Reapply "Fixed Splash Animation" This reverts commit b13733598e066c087cc1835f0e566d9fc6e4ebb3. commit b13733598e066c087cc1835f0e566d9fc6e4ebb3 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 17 00:39:51 2024 +0500 Revert "Fixed Splash Animation" This reverts commit 7ca6548075765db1bc2f62015ffec7fecb6235de. commit 7ca6548075765db1bc2f62015ffec7fecb6235de Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Wed Oct 16 17:19:40 2024 +0500 Fixed Splash Animation commit ec93b630739611fe012cd30c081421d4f63f3395 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Wed Oct 16 16:52:15 2024 +0500 Added New Pipes commit 47925d7b4d767d72f41a8e24b2728645a6444771 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 18:08:10 2024 +0500 Some indentation commit 0c342ac10c38154817b2e11f05821b0f1a1ea674 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 18:07:14 2024 +0500 Increased Level Cell Size commit f3a7e3ed5a1ae97a6aae36cd9e1c87f206a1488c Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 18:02:58 2024 +0500 Revert "Increased Cell size" This reverts commit 6e4c1672ba8e63276cfe45afed9af56abb7668de. commit 6e4c1672ba8e63276cfe45afed9af56abb7668de Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 17:48:28 2024 +0500 Increased Cell size commit dce666657f57307688c7633084330aec07052f78 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 17:36:13 2024 +0500 Added Ranked Up Screen commit d4883314781598c9a3444930ac0a956b1b088890 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Tue Oct 15 14:13:54 2024 +0500 Added new Level Complete Screen commit 1ef6d7cf34773c89b12723f99e26b6aa6043745a Author: TG9six <totalgamer.tg.x@gmail.com> Date: Mon Oct 14 12:04:04 2024 +0400 UI improved Level selection change anchoring improved commit ea8f9899e856e021978159125a8e782bd0cf3a53 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Fri Oct 11 21:05:40 2024 +0500 All UI Done commit d656fb09a601bc57f1e6d004b83256ce26e59d97 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Fri Oct 11 19:15:22 2024 +0500 Added Level Screen commit f131e38a6b7ea830ae6816df16d148bbf3847dcd Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Fri Oct 11 17:13:26 2024 +0500 Gameplay UI Done commit a695895c90522a7208abfa9edc07040021362799 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Fri Oct 11 16:36:09 2024 +0500 Added all gameplay UI commit ab259bf005c7dc1bf01cc334da9b5dd701818496 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Fri Oct 11 11:21:47 2024 +0500 Added Level Type Selection Screen commit 8cebd78cfeec4fea53a38687d8c244c8ff08f15b Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 10 21:33:27 2024 +0500 Added RateUs commit 901e44afafb7b0bca1209df744d9a0be1012cd0b Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 10 20:56:50 2024 +0500 Before addiung unity figma bridge commit bdc01bcb186e1714d5b7efa061418e979b926312 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Thu Oct 10 19:36:39 2024 +0500 Added Settings menu commit 85b53482054a0f4831dc62ca805dbc8a96e474e5 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Wed Oct 9 19:13:39 2024 +0500 Added Main Menu Screen commit a80c82c82f91563ea3a06a5d7cb4219dc9520b14 Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Wed Oct 9 17:26:31 2024 +0500 Added new main menu UI commit 833a599da1496f33d46bd2f32457ad2b16f6bd9d Author: Hazim Bin Ijaz <hazimijaz_gamedev@rizzestudios.com> Date: Wed Oct 9 13:22:52 2024 +0500 Added MainMenu Animation
6 days ago
//////////////////////////////////////////////
/// 2DxFX - 2D SPRITE FX - by VETASOFT 2016 //
/// http://unity3D.vetasoft.com/ //
//////////////////////////////////////////////
Shader "2DxFX/AL/MetalFX"
{
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_Color("_Color", Color) = (1,1,1,1)
_Distortion("Distortion", Range(0,1)) = 0
_Alpha("Alpha", Range(0,1)) = 1.0
[HideInInspector]_SrcBlend("_SrcBlend", Float) = 0
[HideInInspector]_DstBlend("_DstBlend", Float) = 0
[HideInInspector]_BlendOp("_BlendOp",Float) = 0
[HideInInspector]_Z("_Z", Float) = 0
}
SubShader
{
Tags
{
"IgnoreProjector" = "True"
"RenderType" = "TransparentCutout"
"PreviewType" = "Plane"
"CanUseSpriteAtlas" = "True"
}
Cull Off
Lighting Off
ZWrite[_Z]
BlendOp[_BlendOp]
Blend[_SrcBlend][_DstBlend]
CGPROGRAM
#pragma surface surf Lambert vertex:vert nofog keepalpha addshadow fullforwardshadows
#pragma target 3.0
sampler2D _MainTex;
float _Distortion;
float _Alpha;
float4 _Color;
struct Input
{
float2 uv_MainTex;
float4 color;
};
void vert(inout appdata_full v, out Input o)
{
v.vertex = UnityPixelSnap(v.vertex);
UNITY_INITIALIZE_OUTPUT(Input, o);
o.color = v.color * _Color;
}
float3 Metal(float _t)
{
float u = (0.860117757 + 1.54118254e-4*_t + 1.28641212e-7*_t*_t)
/ (1.0 + 8.42420235e-4*_t + 7.08145163e-7*_t*_t);
float v = (0.317398726 + 4.22806245e-5*_t + 4.20481691e-8*_t*_t)
/ (1.0 - 2.89741816e-5*_t + 1.61456053e-7*_t*_t);
float x = 3.0 * u / (2.0 * u - 8.0 * v + 4.0);
float y = 2.0 * v / (2.0 * u - 8.0 * v + 4.0);
float z = 1.0 - x - y;
float Y = 1.0;
float X = (Y / y) * x;
float Z = (Y / y) * z;
float3 RGB = float3(Z,Y,X) / _Distortion;
RGB.x = RGB.x * pow(0.0006*_t, 4.0);
RGB.y = RGB.y * pow(0.0004*_t, 4.0);
RGB.z = RGB.z * pow(0.0004*_t, 4.0);
return RGB;
}
inline float mod(float x,float modu)
{
return x - floor(x * (1.0 / modu)) * modu;
}
float4 rainbow(float t)
{
t = mod(t,1.0);
float tx = t * 6.0;
float r = clamp(tx - 2.0, 0.0, 1.0) + clamp(2.0 - tx, 0.0, 1.0);
return float4(1.0, 1.0, 1.0,r);
}
float4 plasma(float2 uv)
{
float2 tuv = uv;
uv *= 2.5;
float a = 1.1 + _Time / 4 * 20 * 2.25;
float n = sin(a + 2.0 * uv.x) + sin(a - 2.0 * uv.x) + sin(a + 2.0 * uv.y) + sin(a + 5.0 * uv.y);
n = mod(((5.0 + n) / 5.0), 1.0);
n += tex2D(_MainTex, tuv).r * 0.2 + tex2D(_MainTex, tuv).g * 0.4 + tex2D(_MainTex, tuv).b * 0.2;
return rainbow(n);
}
void surf(Input IN, inout SurfaceOutput o)
{
float2 uv = IN.uv_MainTex;
float4 noise = tex2D(_MainTex, uv)* IN.color;
float lum = dot(noise.rgb, float3 (0.4126, 0.8152, 0.1722));
float maxTemp = 4000.0;
float tempScale = maxTemp;
float3 c = Metal(lum * tempScale);
float alpha = tex2D(_MainTex, IN.uv_MainTex).a;
float4 sortie = plasma(IN.uv_MainTex);
sortie.a = sortie.a*alpha - _Alpha;
sortie.rgb = c.rgb + (1 - sortie.a);
sortie.rgb = 0.1 + sortie.rgb / 2 + dot(sortie.rgb, float3 (0.2126, 0.2152, 0.1722));
float4 r = float4(sortie.rgb,noise.a * 1 - _Alpha);
o.Albedo = r.rgb * r.a;
o.Alpha = r.a;
clip(o.Alpha - 0.05);
}
ENDCG
}
Fallback "Transparent/VertexLit"
}