Created
November 10, 2021 09:38
-
-
Save ku6ryo/7e302c57a3592590ba350e6fa5c7c056 to your computer and use it in GitHub Desktop.
PeriodicEmission.shader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "ku6ryo/PeriodicEmission" | |
| { | |
| // Slow blinking (depending on the time passed) emission effect shader made based on the Standard shader. | |
| Properties | |
| { | |
| _Color ("Color", Color) = (1,0,0,1) | |
| _Emission("Emission", Color) = (1,1,0,1) | |
| _Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
| _Metallic ("Metallic", Range(0,1)) = 0.0 | |
| } | |
| SubShader | |
| { | |
| Tags { "RenderType"="Opaque" } | |
| LOD 200 | |
| CGPROGRAM | |
| #pragma surface surf Standard fullforwardshadows | |
| #pragma target 3.0 | |
| struct Input | |
| { | |
| float2 uv_MainTex; | |
| }; | |
| half _Glossiness; | |
| half _Metallic; | |
| fixed4 _Color; | |
| fixed4 _Emission; | |
| void surf (Input IN, inout SurfaceOutputStandard o) | |
| { | |
| o.Albedo = _Color.rgb; | |
| o.Metallic = _Metallic; | |
| o.Smoothness = _Glossiness; | |
| o.Emission = _Emission.rgb * _SinTime.w; | |
| o.Alpha = 1; | |
| } | |
| ENDCG | |
| } | |
| FallBack "Diffuse" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment