Bloom lamps, commit before unifying wall points vbo

This commit is contained in:
jgk
2021-07-11 14:34:10 +02:00
parent 50295daeba
commit 5e21a6527d
4 changed files with 17 additions and 18 deletions
+11 -9
View File
@@ -21,12 +21,14 @@ perspectiveMatrixb rot zoom (tranx,trany) (winx,winy) (viewFromx,viewFromy) =
. vToL
. lmt
$ scaleMat (2*zoom/winx,2*zoom/winy)
-- $ scaleMat (2/winx,2/winy)
!*! rotMatr (-rot)
!*! transMat (viewFromx-tranx,viewFromy-trany)
!*! perMat
!*! perMat (zoom * 0.4)
!*! transMat (-viewFromx,-viewFromy)
!*! vertScale
!*! vertTrans
!*! vertScale
!*! vertTrans 20
-- !*! vertTrans 80
isoMatrix
:: Float -- ^ Rotation
@@ -47,12 +49,12 @@ lmt = Linear.Matrix.transpose
vToL :: V4 a -> [a]
vToL (V4 a b c d) = [a,b,c,d]
perMat :: V4 (V4 Float)
perMat = V4
perMat :: Float -> V4 (V4 Float)
perMat x = V4
(V4 1 0 0 0)
(V4 0 1 0 0)
(V4 0 0 1 0)
(V4 0 0 1 1)
(V4 0 0 x 1)
scaleMat :: Point2 -> V4 (V4 Float)
scaleMat (x,y) = V4
@@ -82,9 +84,9 @@ vertScale = V4
(V4 0 0 (negate 0.005) 0)
(V4 0 0 0 1)
vertTrans :: V4 (V4 Float)
vertTrans = V4
vertTrans :: Float -> V4 (V4 Float)
vertTrans z = V4
(V4 1 0 0 0)
(V4 0 1 0 0)
(V4 0 0 1 (negate 20))
(V4 0 0 1 (negate z))
(V4 0 0 0 1)