some small grass and shader test

This commit is contained in:
2026-01-08 14:55:29 +01:00
commit 26a3eadbc3
31 changed files with 11457 additions and 0 deletions

19
test.gdshader Normal file
View File

@@ -0,0 +1,19 @@
shader_type spatial;
//render_mode vertex_lighting;
uniform sampler2D textureMap : source_color;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
ALBEDO = texture(textureMap, UV).rgb;
//LIGHT_VERTEX = vec3(0.0);
}
void light() {
float lambert = clamp(dot(NORMAL, LIGHT), 0.0, 1.0);
float halfLambert = pow(lambert*0.5 + 0.5, 5);
DIFFUSE_LIGHT += halfLambert * ATTENUATION * LIGHT_COLOR / PI;
}