Add lighting on walls, imperfect
This commit is contained in:
+2
-10
@@ -505,13 +505,5 @@ wallsForGloom w = map (linePairs . _wlLine) $ filter (not . _wlIsSeeThrough)
|
||||
|
||||
lightsForGloom' :: World -> [(Point4)]
|
||||
lightsForGloom' w = map getLS (IM.elems $ _lightSources w) ++ map getTLS (_tempLightSources w)
|
||||
where getLS ls = ( fst $ ssls ls, snd $ ssls ls, _lsRad ls , _lsIntensity ls)
|
||||
getTLS ls = ( fst $ sstls ls,snd $ sstls ls, _tlsRad ls, _tlsIntensity ls)
|
||||
ss' v = rotateV (0 - _cameraRot w) (v -.- _cameraPos w)
|
||||
ss'' (a,b) = (a*2*zoom / _windowX w,b*2*zoom / _windowY w)
|
||||
ss = ss'' . ss'
|
||||
ssls = _lsPos
|
||||
sstls = _tlsPos
|
||||
-- ssls = ss . _lsPos
|
||||
-- sstls = ss . _tlsPos
|
||||
zoom = _cameraZoom w
|
||||
where getLS ls = ( fst $ _lsPos ls, snd $ _lsPos ls, _lsRad ls , _lsIntensity ls)
|
||||
getTLS ls = ( fst $ _tlsPos ls,snd $ _tlsPos ls, _tlsRad ls, _tlsIntensity ls)
|
||||
|
||||
Reference in New Issue
Block a user