Random combination code

This commit is contained in:
2023-02-02 11:41:24 +01:00
parent e046ed821e
commit 75a9075694
6 changed files with 41 additions and 73 deletions
+20
View File
@@ -0,0 +1,20 @@
// 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;
}