Add line shadow shader

This commit is contained in:
jgk
2021-06-26 22:20:41 +02:00
parent 726cd425f2
commit 06f22a3ea5
21 changed files with 128 additions and 74 deletions
+16
View File
@@ -25,6 +25,8 @@ perspectiveMatrixb rot zoom (tranx,trany) (winx,winy) (viewFromx,viewFromy) =
!*! transMat (viewFromx-tranx,viewFromy-trany)
!*! perMat
!*! transMat (-viewFromx,-viewFromy)
!*! vertScale
!*! vertTrans
perspectiveMatrixc
:: Float -- ^ Rotation
@@ -72,3 +74,17 @@ transMat (x,y) = V4
(V4 0 1 0 y)
(V4 0 0 1 0)
(V4 0 0 0 1)
vertScale :: V4 (V4 Float)
vertScale = V4
(V4 1 0 0 0)
(V4 0 1 0 0)
(V4 0 0 (negate 0.005) 0)
(V4 0 0 0 1)
vertTrans :: V4 (V4 Float)
vertTrans = V4
(V4 1 0 0 0)
(V4 0 1 0 0)
(V4 0 0 1 (negate 20))
(V4 0 0 0 1)