Skip to content

Instantly share code, notes, and snippets.

@darthdeus
Created September 6, 2020 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darthdeus/64043adde6dfa83daccab3e46f8da999 to your computer and use it in GitHub Desktop.
Save darthdeus/64043adde6dfa83daccab3e46f8da999 to your computer and use it in GitHub Desktop.
// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "DarkFlame"
{
Properties
{
_Color("Color", Color) = (0.6226415,0.2907618,0.2907618,0)
}
SubShader
{
LOD 0
Cull Off
ZWrite Off
ZTest Always
Pass
{
CGPROGRAM
#pragma vertex Vert
#pragma fragment Frag
#pragma target 3.0
#include "UnityCG.cginc"
#if defined(SHADER_API_D3D11) || defined(SHADER_API_XBOXONE) || defined(UNITY_COMPILER_HLSLCC) || defined(SHADER_API_PSSL) || (defined(SHADER_TARGET_SURFACE_ANALYSIS) && !defined(SHADER_TARGET_SURFACE_ANALYSIS_MOJOSHADER))//ASE Sampler Macros
#define SAMPLE_TEXTURE2D(tex,samplerTex,coord) tex.Sample(samplerTex,coord)
#else//ASE Sampling Macros
#define SAMPLE_TEXTURE2D(tex,samplerTex,coord) tex2D(tex,coord)
#endif//ASE Sampling Macros
struct ASEAttributesDefault
{
float3 vertex : POSITION;
float2 texcoord : TEXCOORD0;
};
struct ASEVaryingsDefault
{
float4 vertex : SV_POSITION;
float2 texcoord : TEXCOORD0;
float2 texcoordStereo : TEXCOORD1;
#if STEREO_INSTANCING_ENABLED
uint stereoTargetEyeIndex : SV_RenderTargetArrayIndex;
#endif
};
uniform sampler2D _MainTex;
uniform half4 _MainTex_TexelSize;
uniform half4 _MainTex_ST;
SamplerState sampler_MainTex;
uniform float4 _Color;
float2 TransformTriangleVertexToUV (float2 vertex)
{
float2 uv = (vertex + 1.0) * 0.5;
return uv;
}
ASEVaryingsDefault Vert( ASEAttributesDefault v )
{
ASEVaryingsDefault o;
o.vertex = float4(v.vertex.xy, 0.0, 1.0);
o.texcoord = TransformTriangleVertexToUV (v.vertex.xy);
#if UNITY_UV_STARTS_AT_TOP
o.texcoord = o.texcoord * float2(1.0, -1.0) + float2(0.0, 1.0);
#endif
o.texcoordStereo = TransformStereoScreenSpaceTex (o.texcoord, 1.0);
v.texcoord = o.texcoordStereo;
float4 ase_ppsScreenPosVertexNorm = float4(o.texcoordStereo,0,1);
return o;
}
float4 Frag (ASEVaryingsDefault i ) : SV_Target
{
float4 ase_ppsScreenPosFragNorm = float4(i.texcoordStereo,0,1);
float2 texCoord27 = i.texcoord.xy * float2( 1,1 ) + float2( 0,0 );
float4 color = ( SAMPLE_TEXTURE2D( _MainTex, sampler_MainTex, texCoord27 ) + _Color );
return color;
}
ENDCG
}
}
CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=18400
883;195;1536;873;838.8297;265.7023;1;True;False
Node;AmplifyShaderEditor.TextureCoordinatesNode;27;-423.8297,67.29773;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.TemplateShaderPropertyNode;28;-312.8297,-73.70227;Inherit;False;0;0;_MainTex;Pass;0;5;SAMPLER2D;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SamplerNode;31;-51.82971,-36.70227;Inherit;True;Property;_TextureSample0;Texture Sample 0;1;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.ColorNode;7;-69,188;Inherit;False;Property;_Color;Color;0;0;Create;True;0;0;False;0;False;0.6226415,0.2907618,0.2907618,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleAddOpNode;32;251.1703,148.2977;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;18;400,174;Float;False;True;-1;2;ASEMaterialInspector;0;2;DarkFlame;32139be9c1eb75640a847f011acf3bcf;True;SubShader 0 Pass 0;0;0;SubShader 0 Pass 0;1;False;False;False;False;False;False;False;False;False;True;2;False;-1;False;False;False;False;False;True;2;False;-1;True;7;False;-1;False;False;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;0;;0;0;Standard;0;0;1;True;False;;True;0
WireConnection;31;0;28;0
WireConnection;31;1;27;0
WireConnection;32;0;31;0
WireConnection;32;1;7;0
WireConnection;18;0;32;0
ASEEND*/
//CHKSM=C9AB193093012892E1E58684C6DA8D1156E14707
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment