summaryrefslogtreecommitdiff
path: root/new_shader.gdshader
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-10-22 22:36:05 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-10-22 22:36:05 +0200
commit257127aa7f0fbb66ddd2600dd3d6a6aca60e56b8 (patch)
tree27f8d1916c0b0f06d806787d1a6226b2cd6bee71 /new_shader.gdshader
initial commit
Diffstat (limited to 'new_shader.gdshader')
-rw-r--r--new_shader.gdshader20
1 files changed, 20 insertions, 0 deletions
diff --git a/new_shader.gdshader b/new_shader.gdshader
new file mode 100644
index 0000000..32b1f7c
--- /dev/null
+++ b/new_shader.gdshader
@@ -0,0 +1,20 @@
+shader_type spatial;
+
+uniform sampler2DArray textures : filter_nearest, source_color;
+
+void vertex() {
+ // Called for every vertex the material is visible on.
+ //vec4 element = texture(textures, vec3(UV, UV2.x));
+ //COLOR = element.rgba;
+}
+
+void fragment() {
+ // Called for every pixel the material is visible on.
+ vec4 element = texture(textures, vec3(UV, UV2.x));
+ ALBEDO = element.rgb;
+}
+
+//void light() {
+ // Called for every pixel for every light affecting the material.
+ // Uncomment to replace the default light processing function with this one.
+//}