shithub: 3dee

Download patch

ref: 0aefb6df51b29b022ec16394ce1a2132e9d41ac1
parent: 7fdc25da4dc85bc6902f6ecdabccf55e601146de
author: rodri <rgl@antares-labs.eu>
date: Wed Oct 2 16:48:34 EDT 2024

fixes and improvements.

--- a/procgen.c
+++ b/procgen.c
@@ -131,8 +131,8 @@
 }
 
 Shadertab shaders = {
-	.vshader = vs,
-	.fshader = fs
+	.vs = vs,
+	.fs = fs
 };
 
 void
--- a/vis.c
+++ b/vis.c
@@ -236,9 +236,9 @@
 		Δorient = mulq(orient, invq(Δorient));
 
 		for(e = scene->ents.next; e != &scene->ents; e = e->next){
-			e->bx = vcs2world(maincam, Vecquat(mulq(mulq(Δorient, Quatvec(0, world2vcs(maincam, e->bx))), invq(Δorient))));
-			e->by = vcs2world(maincam, Vecquat(mulq(mulq(Δorient, Quatvec(0, world2vcs(maincam, e->by))), invq(Δorient))));
-			e->bz = vcs2world(maincam, Vecquat(mulq(mulq(Δorient, Quatvec(0, world2vcs(maincam, e->bz))), invq(Δorient))));
+			e->bx = vcs2world(maincam, qsandwichpt3(Δorient, world2vcs(maincam, e->bx)));
+			e->by = vcs2world(maincam, qsandwichpt3(Δorient, world2vcs(maincam, e->by)));
+			e->bz = vcs2world(maincam, qsandwichpt3(Δorient, world2vcs(maincam, e->bz)));
 		}
 	}else{	/* DBG only */
 		Framebuf *fb;