92 lines
6.2 KiB
GLSL
92 lines
6.2 KiB
GLSL
// Made with Amplify Shader Editor
|
|
// Available at the Unity Asset Store - http://u3d.as/y3X
|
|
Shader "SyntyStudios/Blood"
|
|
{
|
|
Properties
|
|
{
|
|
_Texture("Texture", 2D) = "white" {}
|
|
_Blood("Blood", 2D) = "white" {}
|
|
_BloodColor("BloodColor", Color) = (0.6470588,0.2569204,0.2569204,0)
|
|
_BloodAmount("BloodAmount", Range( 0 , 1)) = 0
|
|
_Spec("Spec", Color) = (0,0,0,0)
|
|
_Smoothness("Smoothness", Range( 0 , 1)) = 0
|
|
_Emissive("Emissive", 2D) = "white" {}
|
|
_EmissiveColor("Emissive Color", Color) = (0,0,0,0)
|
|
[HideInInspector] _texcoord2( "", 2D ) = "white" {}
|
|
[HideInInspector] _texcoord( "", 2D ) = "white" {}
|
|
[HideInInspector] __dirty( "", Int ) = 1
|
|
}
|
|
|
|
SubShader
|
|
{
|
|
Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" "IsEmissive" = "true" }
|
|
Cull Back
|
|
CGPROGRAM
|
|
#pragma target 3.0
|
|
#pragma surface surf Standard keepalpha addshadow fullforwardshadows
|
|
struct Input
|
|
{
|
|
float2 uv_texcoord;
|
|
float2 uv2_texcoord2;
|
|
};
|
|
|
|
uniform sampler2D _Texture;
|
|
uniform float4 _Texture_ST;
|
|
uniform float4 _BloodColor;
|
|
uniform sampler2D _Blood;
|
|
uniform float4 _Blood_ST;
|
|
uniform float _BloodAmount;
|
|
uniform sampler2D _Emissive;
|
|
uniform float4 _Emissive_ST;
|
|
uniform float4 _EmissiveColor;
|
|
uniform float4 _Spec;
|
|
uniform float _Smoothness;
|
|
|
|
void surf( Input i , inout SurfaceOutputStandard o )
|
|
{
|
|
float2 uv_Texture = i.uv_texcoord * _Texture_ST.xy + _Texture_ST.zw;
|
|
float2 uv2_Blood = i.uv2_texcoord2 * _Blood_ST.xy + _Blood_ST.zw;
|
|
float4 lerpResult33 = lerp( float4( 0,0,0,0 ) , tex2D( _Blood, uv2_Blood, float2( 0,0 ), float2( 0,0 ) ) , _BloodAmount);
|
|
float4 lerpResult18 = lerp( tex2D( _Texture, uv_Texture ) , _BloodColor , lerpResult33);
|
|
o.Albedo = lerpResult18.rgb;
|
|
float2 uv_Emissive = i.uv_texcoord * _Emissive_ST.xy + _Emissive_ST.zw;
|
|
o.Emission = ( tex2D( _Emissive, uv_Emissive ) * _EmissiveColor ).rgb;
|
|
o.Smoothness = ( _Spec * _Smoothness ).r;
|
|
o.Alpha = 1;
|
|
}
|
|
|
|
ENDCG
|
|
}
|
|
Fallback "Diffuse"
|
|
CustomEditor "ASEMaterialInspector"
|
|
}
|
|
/*ASEBEGIN
|
|
Version=16900
|
|
2569;29;2537;1403;752.75;706.6466;1.055;True;False
|
|
Node;AmplifyShaderEditor.RangedFloatNode;22;89.29258,247.8153;Float;False;Property;_BloodAmount;BloodAmount;3;0;Create;True;0;0;False;0;0;0;0;1;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SamplerNode;19;91.36753,48.84643;Float;True;Property;_Blood;Blood;1;0;Create;True;0;0;False;0;84508b93f15f2b64386ec07486afc7a3;84508b93f15f2b64386ec07486afc7a3;True;1;False;white;Auto;False;Object;-1;Derivative;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.SamplerNode;27;88.30786,327.5915;Float;True;Property;_Emissive;Emissive;6;0;Create;True;0;0;False;0;84508b93f15f2b64386ec07486afc7a3;84508b93f15f2b64386ec07486afc7a3;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.ColorNode;29;91.10762,524.6633;Float;False;Property;_EmissiveColor;Emissive Color;7;0;Create;True;0;0;False;0;0,0,0,0;0,0,0,0;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.RangedFloatNode;40;91.8708,-32.67192;Float;False;Property;_Smoothness;Smoothness;5;0;Create;True;0;0;False;0;0;0;0;1;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.ColorNode;36;86.29565,-202.9164;Float;False;Property;_Spec;Spec;4;0;Create;True;0;0;False;0;0,0,0,0;0,0,0,0;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.SamplerNode;7;77.10994,-571.7598;Float;True;Property;_Texture;Texture;0;0;Create;True;0;0;False;0;84508b93f15f2b64386ec07486afc7a3;84508b93f15f2b64386ec07486afc7a3;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.ColorNode;20;79.94751,-377.1474;Float;False;Property;_BloodColor;BloodColor;2;0;Create;True;0;0;False;0;0.6470588,0.2569204,0.2569204,0;0.6470588,0.2569204,0.2569204,0;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.LerpOp;33;541.7908,25.74982;Float;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.SimpleMultiplyOpNode;37;448.1605,-196.5867;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.LerpOp;18;803.9475,-569.1474;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;28;549.5278,331.2173;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;1015.966,-568.1995;Float;False;True;2;Float;ASEMaterialInspector;0;0;Standard;SyntyStudios/Blood;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Opaque;0.5;True;True;0;False;Opaque;;Geometry;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;True;0;0;False;-1;0;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;16;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
|
|
WireConnection;33;1;19;0
|
|
WireConnection;33;2;22;0
|
|
WireConnection;37;0;36;0
|
|
WireConnection;37;1;40;0
|
|
WireConnection;18;0;7;0
|
|
WireConnection;18;1;20;0
|
|
WireConnection;18;2;33;0
|
|
WireConnection;28;0;27;0
|
|
WireConnection;28;1;29;0
|
|
WireConnection;0;0;18;0
|
|
WireConnection;0;2;28;0
|
|
WireConnection;0;4;37;0
|
|
ASEEND*/
|
|
//CHKSM=20FDBF1D9AB9875098A3BC64ED79CADBBCA5C2B9 |