Initial godot setup with billboarding experiment.

This commit is contained in:
Henry 2026-05-08 14:34:48 +01:00
commit d0c9fe4fc0
13 changed files with 182 additions and 0 deletions

View file

@ -0,0 +1,14 @@
shader_type spatial;
void vertex() {
vec3 right = normalize(cross(vec3(0.0, 1.0, 0.0), to_camera));
vec3 up = vec3(0.0, 1.0, 0.0);
vec3 forward = normalize(cross(right, up));
mat4 billboard_matrix = mat4(
vec4(right, 0.0),
vec4(up, 0.0),
vec4(forward, 0.0),
vec4(model_pos, 1.0)
);
MODELVIEW_MATRIX = VIEW_MATRIX * billboard_matrix;
}

View file

@ -0,0 +1 @@
uid://du6owhb1rw1ic