40 lines
		
	
	
		
			857 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			857 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| Shader "Custom/NeonCube"
 | |
| {
 | |
|     Properties
 | |
|     {
 | |
|         _MainTex ("Main Texture", 2D) = "white" {}
 | |
|         _EmissionColor ("Emission Color", Color) = (1, 1, 1, 1)
 | |
|         _EmissionIntensity ("Emission Intensity", Range(0, 1)) = 1
 | |
|     }
 | |
| 
 | |
|     SubShader
 | |
|     {
 | |
|         Tags { "RenderType"="Opaque" }
 | |
|         LOD 200
 | |
| 
 | |
|         CGPROGRAM
 | |
|         #pragma surface surf Lambert
 | |
| 
 | |
|         sampler2D _MainTex;
 | |
|         fixed4 _EmissionColor;
 | |
|         half _EmissionIntensity;
 | |
| 
 | |
|         struct Input
 | |
|         {
 | |
|             float2 uv_MainTex;
 | |
|         };
 | |
| 
 | |
|         void surf (Input IN, inout SurfaceOutput o)
 | |
|         {
 | |
|             fixed4 c = tex2D (_MainTex, IN.uv_MainTex);
 | |
|             o.Albedo = c.rgb;
 | |
| 
 | |
|             // Apply emission color and intensity
 | |
|             o.Emission = _EmissionColor.rgb * _EmissionIntensity;
 | |
|         }
 | |
|         ENDCG
 | |
|     }
 | |
| 
 | |
|     FallBack "Diffuse"
 | |
| }
 | 
