|
|
- // Upgrade NOTE: replaced 'UNITY_INSTANCE_ID' with 'UNITY_VERTEX_INPUT_INSTANCE_ID'
-
- // Made with Amplify Shader Editor
- // Available at the Unity Asset Store - http://u3d.as/y3X
- Shader "Custom/Ring"
- {
- Properties
- {
- [HideInInspector] __dirty( "", Int ) = 1
- _Ringsalpha("Rings (alpha)", 2D) = "white" {}
- _Color0("Color 0", Color) = (1,0,0,0)
- _Ringintensity("Ring intensity", Range( 0 , 5)) = 5
- [HideInInspector] _texcoord( "", 2D ) = "white" {}
- }
-
- SubShader
- {
- Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" }
- Cull Off
- CGINCLUDE
- #include "UnityPBSLighting.cginc"
- #include "Lighting.cginc"
- #pragma target 3.0
- struct Input
- {
- float2 uv_texcoord;
- };
-
- uniform float4 _Color0;
- uniform sampler2D _Ringsalpha;
- uniform float4 _Ringsalpha_ST;
- uniform float _Ringintensity;
-
- void surf( Input i , inout SurfaceOutputStandard o )
- {
- o.Albedo = _Color0.rgb;
- float2 uv_Ringsalpha = i.uv_texcoord * _Ringsalpha_ST.xy + _Ringsalpha_ST.zw;
- o.Alpha = ( tex2D( _Ringsalpha,uv_Ringsalpha).a * _Ringintensity );
- }
-
- ENDCG
- CGPROGRAM
- #pragma surface surf Standard alpha:fade keepalpha
-
- ENDCG
- Pass
- {
- Name "ShadowCaster"
- Tags{ "LightMode" = "ShadowCaster" }
- ZWrite On
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment frag
- #pragma target 3.0
- #pragma multi_compile_shadowcaster
- #pragma multi_compile UNITY_PASS_SHADOWCASTER
- #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
- # include "HLSLSupport.cginc"
- #if ( SHADER_API_D3D11 || SHADER_API_GLCORE || SHADER_API_GLES3 )
- #define CAN_SKIP_VPOS
- #endif
- #include "UnityCG.cginc"
- #include "Lighting.cginc"
- #include "UnityPBSLighting.cginc"
- sampler3D _DitherMaskLOD;
- struct v2f
- {
- V2F_SHADOW_CASTER;
- float3 worldPos : TEXCOORD6;
- float4 texcoords01 : TEXCOORD4;
- UNITY_VERTEX_INPUT_INSTANCE_ID
- };
- v2f vert( appdata_full v )
- {
- v2f o;
- UNITY_SETUP_INSTANCE_ID( v );
- UNITY_INITIALIZE_OUTPUT( v2f, o );
- UNITY_TRANSFER_INSTANCE_ID( v, o );
- float3 worldPos = mul( unity_ObjectToWorld, v.vertex ).xyz;
- half3 worldNormal = UnityObjectToWorldNormal( v.normal );
- o.texcoords01 = float4( v.texcoord.xy, v.texcoord1.xy );
- o.worldPos = worldPos;
- TRANSFER_SHADOW_CASTER_NORMALOFFSET( o )
- return o;
- }
- fixed4 frag( v2f IN
- #if !defined( CAN_SKIP_VPOS )
- , UNITY_VPOS_TYPE vpos : VPOS
- #endif
- ) : SV_Target
- {
- UNITY_SETUP_INSTANCE_ID( IN );
- Input surfIN;
- UNITY_INITIALIZE_OUTPUT( Input, surfIN );
- surfIN.uv_texcoord = IN.texcoords01.xy;
- float3 worldPos = IN.worldPos;
- fixed3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) );
- SurfaceOutputStandard o;
- UNITY_INITIALIZE_OUTPUT( SurfaceOutputStandard, o )
- surf( surfIN, o );
- #if defined( CAN_SKIP_VPOS )
- float2 vpos = IN.pos;
- #endif
- half alphaRef = tex3D( _DitherMaskLOD, float3( vpos.xy * 0.25, o.Alpha * 0.9375 ) ).a;
- clip( alphaRef - 0.01 );
- SHADOW_CASTER_FRAGMENT( IN )
- }
- ENDCG
- }
- }
- Fallback "Diffuse"
- CustomEditor "ASEMaterialInspector"
- }
- /*ASEBEGIN
- Version=6001
- 2567;29;1666;974;1022.9;1135.2;1.9;True;True
- Node;AmplifyShaderEditor.SamplerNode;1;-451,94;Float;True;Property;_Ringsalpha;Rings (alpha);0;0;Assets/Exo planets/Textures/Planets/Atawi/Atawi_Rings.tga;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;FLOAT4;FLOAT;FLOAT;FLOAT;FLOAT
- Node;AmplifyShaderEditor.RangedFloatNode;4;-443.4,315.4001;Float;False;Property;_Ringintensity;Ring intensity;2;0;5;0;5;FLOAT
- Node;AmplifyShaderEditor.SimpleMultiplyOpNode;3;-89.40002,186.4001;Float;True;0;FLOAT;0.0;False;1;FLOAT;0.0;False;FLOAT
- Node;AmplifyShaderEditor.ColorNode;2;-365.4,-162.5999;Float;False;Property;_Color0;Color 0;1;0;1,0,0,0;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
- Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;207,-9;Float;False;True;2;Float;ASEMaterialInspector;Standard;Custom/Ring;False;False;False;False;False;False;False;False;False;False;False;False;Off;0;0;False;0;0;Transparent;0.5;True;True;0;False;Transparent;Transparent;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;False;0;255;255;0;0;0;0;False;0;4;10;25;False;0.5;True;0;Zero;Zero;0;Zero;Zero;Add;Add;0;False;0;0,0,0,0;VertexOffset;False;Cylindrical;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0.0;False;4;FLOAT;0.0;False;5;FLOAT;0.0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0.0;False;9;FLOAT;0.0;False;10;OBJECT;0.0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;13;OBJECT;0.0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False
- WireConnection;3;0;1;4
- WireConnection;3;1;4;0
- WireConnection;0;0;2;0
- WireConnection;0;9;3;0
- ASEEND*/
- //CHKSM=C290C9AEC8DFC229E1C43ABF3DCB5828C4FAE703
|