You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
4.2 KiB
71 lines
4.2 KiB
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' |
|
|
|
// Shader created with Shader Forge v1.36 |
|
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/ |
|
// Note: Manually altering this data may prevent you from opening it in Shader Forge |
|
/*SF_DATA;ver:1.36;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:0,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:True,fgod:False,fgor:False,fgmd:0,fgcr:0,fgcg:0,fgcb:0,fgca:1,fgde:0.01,fgrn:0,fgrf:300,stcl:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:True,fnfb:True,fsmp:False;n:type:ShaderForge.SFN_Final,id:4795,x:33036,y:32595,varname:node_4795,prsc:2|emission-2393-OUT;n:type:ShaderForge.SFN_Tex2d,id:6074,x:32191,y:32588,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Multiply,id:2393,x:32589,y:32764,varname:node_2393,prsc:2|A-6074-RGB,B-2053-RGB,C-797-RGB,D-7734-OUT;n:type:ShaderForge.SFN_VertexColor,id:2053,x:32235,y:32772,varname:node_2053,prsc:2;n:type:ShaderForge.SFN_Color,id:797,x:32217,y:32921,ptovrint:True,ptlb:Color,ptin:_TintColor,varname:_TintColor,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:0.5,c2:0.5,c3:0.5,c4:1;n:type:ShaderForge.SFN_Slider,id:7734,x:32103,y:33155,ptovrint:False,ptlb:emiss_power,ptin:_emiss_power,varname:_emiss_power,prsc:2,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,min:1,cur:1,max:250;proporder:6074-797-7734;pass:END;sub:END;*/ |
|
|
|
Shader "Almgp/vfx1/emmision_particle" { |
|
Properties { |
|
_MainTex ("MainTex", 2D) = "white" {} |
|
_TintColor ("Color", Color) = (0.5,0.5,0.5,1) |
|
_emiss_power ("emiss_power", Range(1, 250)) = 1 |
|
} |
|
SubShader { |
|
Tags { |
|
"RenderType"="Opaque" |
|
} |
|
Pass { |
|
Name "FORWARD" |
|
Tags { |
|
"LightMode"="ForwardBase" |
|
} |
|
|
|
|
|
CGPROGRAM |
|
#pragma vertex vert |
|
#pragma fragment frag |
|
#define UNITY_PASS_FORWARDBASE |
|
#include "UnityCG.cginc" |
|
#pragma multi_compile_fwdbase_fullshadows |
|
#pragma multi_compile_fog |
|
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal |
|
#pragma target 3.0 |
|
uniform sampler2D _MainTex; uniform float4 _MainTex_ST; |
|
uniform float4 _TintColor; |
|
uniform float _emiss_power; |
|
struct VertexInput { |
|
float4 vertex : POSITION; |
|
float2 texcoord0 : TEXCOORD0; |
|
float4 vertexColor : COLOR; |
|
}; |
|
struct VertexOutput { |
|
float4 pos : SV_POSITION; |
|
float2 uv0 : TEXCOORD0; |
|
float4 vertexColor : COLOR; |
|
UNITY_FOG_COORDS(1) |
|
}; |
|
VertexOutput vert (VertexInput v) { |
|
VertexOutput o = (VertexOutput)0; |
|
o.uv0 = v.texcoord0; |
|
o.vertexColor = v.vertexColor; |
|
o.pos = UnityObjectToClipPos(v.vertex ); |
|
UNITY_TRANSFER_FOG(o,o.pos); |
|
return o; |
|
} |
|
float4 frag(VertexOutput i) : COLOR { |
|
////// Lighting: |
|
////// Emissive: |
|
float4 _MainTex_var = tex2D(_MainTex,TRANSFORM_TEX(i.uv0, _MainTex)); |
|
float3 node_2393 = (_MainTex_var.rgb*i.vertexColor.rgb*_TintColor.rgb*_emiss_power); |
|
float3 emissive = node_2393; |
|
float3 finalColor = emissive; |
|
fixed4 finalRGBA = fixed4(finalColor,1); |
|
UNITY_APPLY_FOG_COLOR(i.fogCoord, finalRGBA, fixed4(0,0,0,1)); |
|
return finalRGBA; |
|
} |
|
ENDCG |
|
} |
|
} |
|
CustomEditor "ShaderForgeMaterialInspector" |
|
}
|
|
|