Unify matrix uniform assignment, move towards uniform block

This commit is contained in:
jgk
2021-06-24 14:38:17 +02:00
parent 2625927f14
commit d534f08064
19 changed files with 70 additions and 91 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ tToRender t = map Render3x3 $ polyToTris $ zip ps3 coords3
where
ps = _tilePoly t
coords = map (calcTexCoord (_tileCenter t) (_tileX t) (_tileY t)) ps
ps3 = map (mkTrip (0.9)) ps
ps3 = map (mkTrip 0.9) ps
coords3 = map (mkTrip (_tileZ t)) coords
mkTrip :: c -> (a,b) -> (a,b,c)
@@ -43,6 +43,6 @@ oTile poly z = Tile
}
where
c = head poly
xdir = 50 *.* (normalizeV (poly !! 1 -.- c))
xdir = 50 *.* normalizeV (poly !! 1 -.- c)
x = c +.+ xdir
y = c +.+ vNormal xdir