63 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			Plaintext
		
	
		
		
			
		
	
	
			63 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			Plaintext
		
	
| 
								 | 
							
								// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// Shader created with Shader Forge v1.30 
							 | 
						||
| 
								 | 
							
								// 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.30;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,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,rpth:0,vtps:0,hqsc:False,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,rfrpo:False,rfrpn:Refraction,coma:15,ufog:False,aust:True,igpj:False,qofs:0,qpre:1,rntp:1,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:0.5,fgcg:0.5,fgcb:0.5,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:True,fnsp:True,fnfb:False;n:type:ShaderForge.SFN_Final,id:2065,x:32719,y:32712,varname:node_2065,prsc:2|emission-1091-OUT;n:type:ShaderForge.SFN_Tex2d,id:40,x:32246,y:32714,ptovrint:False,ptlb:MainTex,ptin:_MainTex,varname:_MainTex,prsc:0,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,ntxv:0,isnm:False;n:type:ShaderForge.SFN_Color,id:233,x:32247,y:32974,ptovrint:False,ptlb:Color,ptin:_Color,varname:_Color,prsc:0,glob:False,taghide:False,taghdr:False,tagprd:False,tagnsco:False,tagnrm:False,c1:1,c2:1,c3:1,c4:1;n:type:ShaderForge.SFN_Multiply,id:1091,x:32504,y:32878,varname:node_1091,prsc:2|A-40-RGB,B-233-RGB;proporder:40-233;pass:END;sub:END;*/
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Shader "ysj/SelfLuminous" {
							 | 
						||
| 
								 | 
							
								    Properties {
							 | 
						||
| 
								 | 
							
								        _MainTex ("MainTex", 2D) = "white" {}
							 | 
						||
| 
								 | 
							
								        _Color ("Color", Color) = (1,1,1,1)
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    SubShader {
							 | 
						||
| 
								 | 
							
								        Tags {
							 | 
						||
| 
								 | 
							
								            "RenderType"="Opaque"
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        LOD 100
							 | 
						||
| 
								 | 
							
								        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 exclude_renderers d3d11_9x xbox360 xboxone ps3 ps4 psp2 
							 | 
						||
| 
								 | 
							
								            #pragma target 2.0
							 | 
						||
| 
								 | 
							
								            uniform sampler2D _MainTex; uniform float4 _MainTex_ST;
							 | 
						||
| 
								 | 
							
								            uniform fixed4 _Color;
							 | 
						||
| 
								 | 
							
								            struct VertexInput {
							 | 
						||
| 
								 | 
							
								                float4 vertex : POSITION;
							 | 
						||
| 
								 | 
							
								                float2 texcoord0 : TEXCOORD0;
							 | 
						||
| 
								 | 
							
								            };
							 | 
						||
| 
								 | 
							
								            struct VertexOutput {
							 | 
						||
| 
								 | 
							
								                float4 pos : SV_POSITION;
							 | 
						||
| 
								 | 
							
								                float2 uv0 : TEXCOORD0;
							 | 
						||
| 
								 | 
							
								            };
							 | 
						||
| 
								 | 
							
								            VertexOutput vert (VertexInput v) {
							 | 
						||
| 
								 | 
							
								                VertexOutput o = (VertexOutput)0;
							 | 
						||
| 
								 | 
							
								                o.uv0 = v.texcoord0;
							 | 
						||
| 
								 | 
							
								                o.pos = UnityObjectToClipPos(v.vertex );
							 | 
						||
| 
								 | 
							
								                return o;
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								            float4 frag(VertexOutput i) : COLOR {
							 | 
						||
| 
								 | 
							
								////// Lighting:
							 | 
						||
| 
								 | 
							
								////// Emissive:
							 | 
						||
| 
								 | 
							
								                fixed4 _MainTex_var = tex2D(_MainTex,TRANSFORM_TEX(i.uv0, _MainTex));
							 | 
						||
| 
								 | 
							
								                float3 emissive = (_MainTex_var.rgb*_Color.rgb);
							 | 
						||
| 
								 | 
							
								                float3 finalColor = emissive;
							 | 
						||
| 
								 | 
							
								                return fixed4(finalColor,1);
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								            ENDCG
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    FallBack "Diffuse"
							 | 
						||
| 
								 | 
							
								    CustomEditor "ShaderForgeMaterialInspector"
							 | 
						||
| 
								 | 
							
								}
							 |