first commit

This commit is contained in:
team3
2026-08-29 11:44:31 +02:00
commit c9416ed3c6
66 changed files with 4821 additions and 0 deletions

16
scripts/mat.gd Normal file
View File

@@ -0,0 +1,16 @@
extends RefCounted
## Material-Cache: eine ShaderMaterial pro Farbe, flat shaded.
const FLAT_SHADER := preload("res://shaders/flat.gdshader")
static var _cache: Dictionary = {}
static func flat(color: Color) -> ShaderMaterial:
var key := color.to_rgba32()
if _cache.has(key):
return _cache[key]
var m := ShaderMaterial.new()
m.shader = FLAT_SHADER
m.set_shader_parameter("albedo", color)
_cache[key] = m
return m