Files
ProjectBall.Unity/Assets/Shaders/EnergyField.shader
T

56 lines
994 B
Plaintext
Raw Normal View History

2025-05-13 05:18:03 +03:00
Shader "Custom/EnergyField" {
Properties {
_DiffuseColor ("Diffuse Color", Color) = (1.0,1.0,1.0,1.0)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Blend SrcAlpha OneMinusSrcAlpha
Tags { "RenderType"="Transparent" "Queue" = "Transparent"}
Cull Front
CGPROGRAM
#pragma surface surf Lambert
float4 _DiffuseColor;
sampler2D _MainTex;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D (_MainTex, IN.uv_MainTex);
o.Emission = _DiffuseColor.rgb;
o.Alpha = c.r;
}
ENDCG
Tags { "RenderType"="Transparent" "Queue" = "Transparent"}
Cull Back
CGPROGRAM
#pragma surface surf Lambert
float4 _DiffuseColor;
sampler2D _MainTex;
struct Input {
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D (_MainTex, IN.uv_MainTex);
o.Emission = _DiffuseColor.rgb;
o.Alpha = c.a;
}
ENDCG
}
FallBack "Diffuse"
}