237 lines
12 KiB
Plaintext
237 lines
12 KiB
Plaintext
|
|
// Made with Amplify Shader Editor
|
||
|
|
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||
|
|
Shader "RO/RO_Effect_Bing_02"
|
||
|
|
{
|
||
|
|
Properties
|
||
|
|
{
|
||
|
|
[HDR]_Color0("Color 0", Color) = (1,1,1,0)
|
||
|
|
[HDR]_Color1("Color 1", Color) = (0,0,0,0)
|
||
|
|
_Vector0("Vector 0", Vector) = (0,0,0,0)
|
||
|
|
_Vector1("Vector 1", Vector) = (0,0,0,0)
|
||
|
|
[HDR]_Color2("Color 2", Color) = (1,1,1,1)
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
SubShader
|
||
|
|
{
|
||
|
|
|
||
|
|
|
||
|
|
Tags{ "RenderType" = "Custom" "Queue" = "Transparent+0" "IsEmissive" = "true" }
|
||
|
|
LOD 100
|
||
|
|
|
||
|
|
CGINCLUDE
|
||
|
|
#pragma target 3.0
|
||
|
|
ENDCG
|
||
|
|
Blend SrcAlpha OneMinusSrcAlpha
|
||
|
|
Cull Back
|
||
|
|
ColorMask RGBA
|
||
|
|
ZWrite On
|
||
|
|
ZTest LEqual
|
||
|
|
Offset 0 , 0
|
||
|
|
Pass
|
||
|
|
{
|
||
|
|
|
||
|
|
Name "Unlit"
|
||
|
|
CGPROGRAM
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
#ifndef UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX
|
||
|
|
//only defining to not throw compilation error over Unity 5.5
|
||
|
|
#define UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input)
|
||
|
|
#endif
|
||
|
|
#pragma vertex vert
|
||
|
|
#pragma fragment frag
|
||
|
|
#pragma multi_compile_instancing
|
||
|
|
#include "UnityCG.cginc"
|
||
|
|
#define ASE_NEEDS_FRAG_WORLD_POSITION
|
||
|
|
#define ASE_NEEDS_FRAG_COLOR
|
||
|
|
|
||
|
|
|
||
|
|
struct appdata
|
||
|
|
{
|
||
|
|
float4 vertex : POSITION;
|
||
|
|
float4 color : COLOR;
|
||
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
|
float3 ase_normal : NORMAL;
|
||
|
|
float4 ase_texcoord : TEXCOORD0;
|
||
|
|
float4 ase_texcoord1 : TEXCOORD1;
|
||
|
|
};
|
||
|
|
|
||
|
|
struct v2f
|
||
|
|
{
|
||
|
|
float4 vertex : SV_POSITION;
|
||
|
|
#ifdef ASE_NEEDS_FRAG_WORLD_POSITION
|
||
|
|
float3 worldPos : TEXCOORD0;
|
||
|
|
#endif
|
||
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
||
|
|
float4 ase_color : COLOR;
|
||
|
|
float4 ase_texcoord1 : TEXCOORD1;
|
||
|
|
float4 ase_texcoord2 : TEXCOORD2;
|
||
|
|
float4 ase_texcoord3 : TEXCOORD3;
|
||
|
|
};
|
||
|
|
|
||
|
|
uniform float4 _Color0;
|
||
|
|
uniform float4 _Color1;
|
||
|
|
uniform float4 _Vector0;
|
||
|
|
uniform float4 _Vector1;
|
||
|
|
UNITY_DECLARE_DEPTH_TEXTURE( _CameraDepthTexture );
|
||
|
|
uniform float4 _CameraDepthTexture_TexelSize;
|
||
|
|
uniform float4 _Color2;
|
||
|
|
|
||
|
|
|
||
|
|
v2f vert ( appdata v )
|
||
|
|
{
|
||
|
|
v2f o;
|
||
|
|
UNITY_SETUP_INSTANCE_ID(v);
|
||
|
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||
|
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||
|
|
|
||
|
|
float3 ase_worldNormal = UnityObjectToWorldNormal(v.ase_normal);
|
||
|
|
o.ase_texcoord1.xyz = ase_worldNormal;
|
||
|
|
float4 ase_clipPos = UnityObjectToClipPos(v.vertex);
|
||
|
|
float4 screenPos = ComputeScreenPos(ase_clipPos);
|
||
|
|
o.ase_texcoord3 = screenPos;
|
||
|
|
|
||
|
|
o.ase_color = v.color;
|
||
|
|
o.ase_texcoord2.xy = v.ase_texcoord.xy;
|
||
|
|
o.ase_texcoord2.zw = v.ase_texcoord1.xy;
|
||
|
|
|
||
|
|
//setting value to unused interpolator channels and avoid initialization warnings
|
||
|
|
o.ase_texcoord1.w = 0;
|
||
|
|
float3 vertexValue = float3(0, 0, 0);
|
||
|
|
#if ASE_ABSOLUTE_VERTEX_POS
|
||
|
|
vertexValue = v.vertex.xyz;
|
||
|
|
#endif
|
||
|
|
vertexValue = vertexValue;
|
||
|
|
#if ASE_ABSOLUTE_VERTEX_POS
|
||
|
|
v.vertex.xyz = vertexValue;
|
||
|
|
#else
|
||
|
|
v.vertex.xyz += vertexValue;
|
||
|
|
#endif
|
||
|
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||
|
|
|
||
|
|
#ifdef ASE_NEEDS_FRAG_WORLD_POSITION
|
||
|
|
o.worldPos = mul(unity_ObjectToWorld, v.vertex).xyz;
|
||
|
|
#endif
|
||
|
|
return o;
|
||
|
|
}
|
||
|
|
|
||
|
|
fixed4 frag (v2f i ) : SV_Target
|
||
|
|
{
|
||
|
|
UNITY_SETUP_INSTANCE_ID(i);
|
||
|
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
||
|
|
fixed4 finalColor;
|
||
|
|
#ifdef ASE_NEEDS_FRAG_WORLD_POSITION
|
||
|
|
float3 WorldPosition = i.worldPos;
|
||
|
|
#endif
|
||
|
|
float3 ase_worldViewDir = UnityWorldSpaceViewDir(WorldPosition);
|
||
|
|
ase_worldViewDir = normalize(ase_worldViewDir);
|
||
|
|
float3 ase_worldNormal = i.ase_texcoord1.xyz;
|
||
|
|
float fresnelNdotV16 = dot( ase_worldNormal, ase_worldViewDir );
|
||
|
|
float fresnelNode16 = ( 0.0 + 1.0 * pow( 1.0 - fresnelNdotV16, _Vector0.x ) );
|
||
|
|
float2 uv0185 = i.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
|
||
|
|
float smoothstepResult181 = smoothstep( _Vector0.z , 1.0 , ( 1.0 - uv0185.y ));
|
||
|
|
float smoothstepResult195 = smoothstep( 0.9 , 1.0 , uv0185.y);
|
||
|
|
float2 uv1186 = i.ase_texcoord2.zw * float2( 1,1 ) + float2( 0,0 );
|
||
|
|
float smoothstepResult191 = smoothstep( _Vector1.z , _Vector1.w , distance( uv1186 , float2( 0.5,0.5 ) ));
|
||
|
|
float temp_output_192_0 = ( smoothstepResult191 * _Vector0.w );
|
||
|
|
float4 lerpResult20 = lerp( _Color0 , _Color1 , max( max( ( fresnelNode16 * _Vector0.y ) , saturate( ( smoothstepResult181 + smoothstepResult195 ) ) ) , temp_output_192_0 ));
|
||
|
|
float4 screenPos = i.ase_texcoord3;
|
||
|
|
float4 ase_screenPosNorm = screenPos / screenPos.w;
|
||
|
|
ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
|
||
|
|
float screenDepth114 = LinearEyeDepth(SAMPLE_DEPTH_TEXTURE( _CameraDepthTexture, ase_screenPosNorm.xy ));
|
||
|
|
float distanceDepth114 = abs( ( screenDepth114 - LinearEyeDepth( ase_screenPosNorm.z ) ) / ( _Vector1.x ) );
|
||
|
|
float4 appendResult199 = (float4((saturate( ( ( i.ase_color * saturate( lerpResult20 ) ) + ( ( 1.0 - saturate( distanceDepth114 ) ) * _Vector1.y * _Color2 ) + temp_output_192_0 ) )).rgb , i.ase_color.a));
|
||
|
|
|
||
|
|
|
||
|
|
finalColor = appendResult199;
|
||
|
|
return finalColor;
|
||
|
|
}
|
||
|
|
ENDCG
|
||
|
|
}
|
||
|
|
}
|
||
|
|
CustomEditor "ASEMaterialInspector"
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
/*ASEBEGIN
|
||
|
|
Version=18100
|
||
|
|
2389;1;1442;1010;-3346.288;397.134;2.073337;True;True
|
||
|
|
Node;AmplifyShaderEditor.TextureCoordinatesNode;185;1939.513,1647.519;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.OneMinusNode;175;2414.045,1292.677;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.Vector4Node;99;2276.002,954.4924;Inherit;False;Property;_Vector0;Vector 0;2;0;Create;True;0;0;False;0;False;0,0,0,0;1.49,1.41,0.48,0.16;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.TextureCoordinatesNode;186;2298.774,1499.053;Inherit;False;1;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.SmoothstepOpNode;195;2677.141,1379.223;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0.9;False;2;FLOAT;1;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.SmoothstepOpNode;181;2684.637,1139.765;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.Vector2Node;189;2510.056,1723.272;Inherit;False;Constant;_Vector2;Vector 2;6;0;Create;True;0;0;False;0;False;0.5,0.5;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
|
||
|
|
Node;AmplifyShaderEditor.FresnelNode;16;2412.625,669.8525;Inherit;True;Standard;WorldNormal;ViewDir;False;False;5;0;FLOAT3;0,0,1;False;4;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;5;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.Vector4Node;120;3001.725,1280.81;Inherit;False;Property;_Vector1;Vector 1;3;0;Create;True;0;0;False;0;False;0,0,0,0;2,1.42,0.38,0.76;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.SimpleAddOpNode;196;2964.506,1169.16;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.DistanceOpNode;188;2804.479,1601.595;Inherit;True;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.SmoothstepOpNode;191;3157.331,1571.816;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0.5;False;2;FLOAT;0.7;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.SaturateNode;184;3085.097,1156.308;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;19;2863.679,765.9078;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.SimpleMaxOpNode;174;3305.654,958.3116;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;192;3438.546,1454.644;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.DepthFade;114;3543.134,832.6747;Inherit;False;True;False;True;2;1;FLOAT3;0,0,0;False;0;FLOAT;1;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.ColorNode;22;3214.749,492.9725;Inherit;False;Property;_Color1;Color 1;1;1;[HDR];Create;True;0;0;False;0;False;0,0,0,0;0.7033516,1.223741,1.675399,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.ColorNode;21;3220.671,161.2039;Inherit;False;Property;_Color0;Color 0;0;1;[HDR];Create;True;0;0;False;0;False;1,1,1,0;0.1498309,0.2859313,0.8584906,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.SimpleMaxOpNode;193;3555.682,1019.247;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.SaturateNode;115;3777.641,829.405;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.LerpOp;20;3738.341,537.7831;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
|
||
|
|
Node;AmplifyShaderEditor.VertexColorNode;103;3736.314,320.3057;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.OneMinusNode;116;3948.541,833.205;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
|
Node;AmplifyShaderEditor.SaturateNode;23;4116.839,560.3595;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
|
Node;AmplifyShaderEditor.ColorNode;121;3954.118,1046.984;Inherit;False;Property;_Color2;Color 2;4;1;[HDR];Create;True;0;0;False;0;False;1,1,1,1;0,0.4188697,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;119;4185.22,836.2615;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;104;4295.75,488.461;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
|
Node;AmplifyShaderEditor.SimpleAddOpNode;118;4636.146,621.7373;Inherit;False;3;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
|
||
|
|
Node;AmplifyShaderEditor.SaturateNode;176;4820.855,632.8966;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
|
Node;AmplifyShaderEditor.ComponentMaskNode;200;4948.608,724.3093;Inherit;False;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0
|
||
|
|
Node;AmplifyShaderEditor.DynamicAppendNode;199;5143.184,791.5046;Inherit;False;FLOAT4;4;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
|
||
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;198;5539.169,671.0723;Float;False;True;-1;2;ASEMaterialInspector;100;1;RO/RO_Effect_Bing_02;0770190933193b94aaa3065e307002fa;True;Unlit;0;0;Unlit;2;True;0;1;False;-1;0;False;-1;0;1;False;-1;0;False;-1;True;0;False;-1;0;False;-1;True;False;True;0;False;-1;True;True;True;True;True;0;False;-1;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;RenderType=Opaque=RenderType;True;2;0;False;False;False;False;False;False;False;False;False;True;1;LightMode=ForwardBase;False;0;;0;0;Standard;1;Vertex Position,InvertActionOnDeselection;1;0;1;True;False;;0
|
||
|
|
WireConnection;175;0;185;2
|
||
|
|
WireConnection;195;0;185;2
|
||
|
|
WireConnection;181;0;175;0
|
||
|
|
WireConnection;181;1;99;3
|
||
|
|
WireConnection;16;3;99;1
|
||
|
|
WireConnection;196;0;181;0
|
||
|
|
WireConnection;196;1;195;0
|
||
|
|
WireConnection;188;0;186;0
|
||
|
|
WireConnection;188;1;189;0
|
||
|
|
WireConnection;191;0;188;0
|
||
|
|
WireConnection;191;1;120;3
|
||
|
|
WireConnection;191;2;120;4
|
||
|
|
WireConnection;184;0;196;0
|
||
|
|
WireConnection;19;0;16;0
|
||
|
|
WireConnection;19;1;99;2
|
||
|
|
WireConnection;174;0;19;0
|
||
|
|
WireConnection;174;1;184;0
|
||
|
|
WireConnection;192;0;191;0
|
||
|
|
WireConnection;192;1;99;4
|
||
|
|
WireConnection;114;0;120;1
|
||
|
|
WireConnection;193;0;174;0
|
||
|
|
WireConnection;193;1;192;0
|
||
|
|
WireConnection;115;0;114;0
|
||
|
|
WireConnection;20;0;21;0
|
||
|
|
WireConnection;20;1;22;0
|
||
|
|
WireConnection;20;2;193;0
|
||
|
|
WireConnection;116;0;115;0
|
||
|
|
WireConnection;23;0;20;0
|
||
|
|
WireConnection;119;0;116;0
|
||
|
|
WireConnection;119;1;120;2
|
||
|
|
WireConnection;119;2;121;0
|
||
|
|
WireConnection;104;0;103;0
|
||
|
|
WireConnection;104;1;23;0
|
||
|
|
WireConnection;118;0;104;0
|
||
|
|
WireConnection;118;1;119;0
|
||
|
|
WireConnection;118;2;192;0
|
||
|
|
WireConnection;176;0;118;0
|
||
|
|
WireConnection;200;0;176;0
|
||
|
|
WireConnection;199;0;200;0
|
||
|
|
WireConnection;199;3;103;4
|
||
|
|
WireConnection;198;0;199;0
|
||
|
|
ASEEND*/
|
||
|
|
//CHKSM=29D0A3474D6A2EBBC8187980B569753C74F8D5FC
|