21 lines
517 B
Plaintext
21 lines
517 B
Plaintext
// NOTE: Shader automatically converted from Godot Engine 4.0.beta15's StandardMaterial3D.
|
|
|
|
shader_type spatial;
|
|
render_mode specular_disabled;
|
|
|
|
|
|
void light() {
|
|
float diff = LIGHT_COLOR.b - LIGHT_COLOR.g - LIGHT_COLOR.r;
|
|
if (diff > 0.5 && LIGHT_COLOR.b > LIGHT_COLOR.g && LIGHT_COLOR.b > LIGHT_COLOR.r) {
|
|
DIFFUSE_LIGHT += clamp(dot(NORMAL, LIGHT), 0.0, 1.0) * ATTENUATION * ALBEDO;
|
|
ALPHA = ATTENUATION;
|
|
}
|
|
}
|
|
|
|
|
|
void fragment() {
|
|
ALBEDO = vec3(0.4, 0.8, 1.0);
|
|
EMISSION = vec3(0.4, 0.8, 1.0);
|
|
ALPHA = 0.0;
|
|
}
|