Tweak bloom, remove pistol spread
This commit is contained in:
@@ -61,7 +61,7 @@ pistol = defaultGun
|
||||
, _itUseModifiers =
|
||||
[ hammerCheckI
|
||||
, shootWithSoundI 0
|
||||
, withRandomDirI 0.1
|
||||
-- , withRandomDirI 0.1
|
||||
, withMuzFlareI
|
||||
]
|
||||
, _itLeftClickUse = Nothing
|
||||
|
||||
@@ -50,7 +50,7 @@ shootBezier targetp cr w = w & particles %~ (theBullet :)
|
||||
where
|
||||
theBullet = aCurveBulAt
|
||||
(Just cid)
|
||||
white
|
||||
(V4 200 200 200 1)
|
||||
startp
|
||||
(controlp +.+ randPos)
|
||||
(targetp +.+ randPos')
|
||||
|
||||
@@ -10,7 +10,7 @@ basicBullet = BulletAmmo
|
||||
{ _amString = "BULLET"
|
||||
, _amBulEff = destroyOnImpact bulHitCr bulHitWall' bulHitFF'
|
||||
, _amBulWth = 2
|
||||
, _amBulVel = V2 30 0
|
||||
, _amBulVel = V2 50 0
|
||||
}
|
||||
hvBullet :: Ammo
|
||||
hvBullet = BulletAmmo
|
||||
|
||||
@@ -62,7 +62,6 @@ moveLaser phaseV pos dir w pt
|
||||
xp = pos +.+ 800 *.* unitVectorAtAngle dir
|
||||
(a,g) = randomR (-0.7,0.7) $ _randGen w
|
||||
reflectDir wall = a + argV (reflectIn (uncurry (-.-) (_wlLine wall)) (xp -.- pos))
|
||||
(colID,_) = randomR (0,11) $ _randGen w
|
||||
f :: [Wall] -> Point2 -> Point2 -> (Maybe (Point2,Either3 Creature Wall ForceField),[Point2])
|
||||
f seenWs x y = case find (h' seenWs) $ thingsHitExceptCrLongLine Nothing x y w of
|
||||
Just (p,E3x2 wl)
|
||||
@@ -103,14 +102,18 @@ moveLaser phaseV pos dir w pt
|
||||
Just (p,E3x1 cr)
|
||||
-> over (creatures . ix (_crID cr) . crState . crDamage) ((:) $ Lasering 19 pos p xp)
|
||||
-- . over worldEvents ((.) $ flareAt yellow (flarePos p))
|
||||
Just (p,E3x2 wl) -> createSpark 8 colID (p +.+ safeNormalizeV (pos -.- p))
|
||||
Just (p,E3x2 wl) -> createSparkCol 8 (V4 20 (-5) 0 1) (p +.+ safeNormalizeV (pos -.- p))
|
||||
(reflectDir wl) Nothing
|
||||
_ -> id
|
||||
pic = setDepth 20 $ pictures
|
||||
[ fadeLine pos (head ps) 0.2 40 yellow
|
||||
, setLayer 1 $ color (withAlpha 0.9 white) $ vThickLine (pos:ps)
|
||||
, setLayer 1 $ color (withAlpha 0.5 yellow) $ vvThickLine (pos:ps)
|
||||
pic = setLayer 1 $ pictures
|
||||
[ setDepth 19 . color (brightX 0 0.5 yellow) $ lineOfThickness 20 (pos:ps)
|
||||
, setDepth 19.5 . color (brightX 10 1 yellow) $ lineOfThickness 3 (pos:ps)
|
||||
]
|
||||
-- $ pictures
|
||||
--[ fadeLine pos (head ps) 0.2 40 yellow
|
||||
--, setLayer 1 $ color (withAlpha 0.9 white) $ vThickLine (pos:ps)
|
||||
--, setLayer 1 $ color (withAlpha 0.5 yellow) $ vvThickLine (pos:ps)
|
||||
--]
|
||||
|
||||
fadeLine :: Point2 -> Point2 -> Float -> Float -> Color -> Picture
|
||||
fadeLine sp ep alph width col = setLayer 1 $ polygonCol
|
||||
|
||||
@@ -19,7 +19,7 @@ aGenBulAt maycid pos vel hiteff width = Bul'
|
||||
{ _ptDraw = drawBul
|
||||
, _ptUpdate' = mvGenBullet
|
||||
, _btVel' = vel
|
||||
, _btColor' = V4 100 100 50 1.5
|
||||
, _btColor' = V4 2 2 2 2
|
||||
, _btTrail' = [pos]
|
||||
, _btPassThrough' = maycid
|
||||
, _btWidth' = width
|
||||
|
||||
+3
-3
@@ -112,7 +112,7 @@ doDrawing pdata w = do
|
||||
textureBinding Texture2D $= Just (snd $ _fboBloom pdata)
|
||||
blend $= Disabled
|
||||
drawShader (_bloomBlurShader pdata) 4
|
||||
replicateM_ 2 $ pingPongBetween (_fboFourth1 pdata) (_fboFourth2 pdata) (_bloomBlurShader pdata)
|
||||
replicateM_ 5 $ pingPongBetween (_fboFourth1 pdata) (_fboFourth2 pdata) (_bloomBlurShader pdata)
|
||||
blend $= Enabled
|
||||
viewport $= (Position 0 0
|
||||
, divideSize (w ^. config . shadow_resolution) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
|
||||
@@ -142,8 +142,8 @@ doDrawing pdata w = do
|
||||
textureBinding Texture2D $= Just (snd $ _fboFourth1 pdata)
|
||||
drawShader (_fullscreenShader pdata) 4
|
||||
blendFunc $= (SrcAlpha, OneMinusSrcAlpha)
|
||||
textureBinding Texture2D $= Just (snd $ _fboBloom pdata)
|
||||
drawShader (_fullscreenShader pdata) 4
|
||||
-- textureBinding Texture2D $= Just (snd $ _fboBloom pdata)
|
||||
-- drawShader (_fullscreenShader pdata) 4
|
||||
|
||||
depthFunc $= Just Lequal
|
||||
--mapM_ (uncurry $ drawShaderLay 2) (vnums IM.! 2)
|
||||
|
||||
@@ -303,10 +303,10 @@ drawTeslaArc pt = pic
|
||||
where
|
||||
ps' = _ptPoints pt
|
||||
pic = setLayer 1 $ pictures
|
||||
[ setDepth 20.5 $ color (_ptColor pt) $ line ps'
|
||||
, setDepth 20 $ color (withAlpha 0.02 cyan) $ lineOfThickness 20 ps'
|
||||
, setDepth 20 $ color (withAlpha 0.02 cyan) $ lineOfThickness 25 ps'
|
||||
, setDepth 20 $ color (withAlpha 0.02 cyan) $ lineOfThickness 30 ps'
|
||||
[ setDepth 20.5 $ color (brightX 2 2 $ _ptColor pt) $ lineOfThickness 3 ps'
|
||||
-- , setDepth 20 $ color (withAlpha 0.02 cyan) $ lineOfThickness 20 ps'
|
||||
-- , setDepth 20 $ color (withAlpha 0.02 cyan) $ lineOfThickness 25 ps'
|
||||
-- , setDepth 20 $ color (withAlpha 0.02 cyan) $ lineOfThickness 30 ps'
|
||||
]
|
||||
-- todo: fix electrical damage location
|
||||
moveTeslaArc
|
||||
@@ -326,13 +326,13 @@ moveTeslaArc p d w pt
|
||||
| otherwise = (w , Just $ pt & ptTimer -~ 1)
|
||||
where
|
||||
t = _ptTimer pt
|
||||
ps = take 15 $ p : map f (crsLightChain p d 0 w)
|
||||
ps = take 25 $ p : map f (crsLightChain p d 0 w)
|
||||
f (E3x1 cr) = _crPos cr
|
||||
f (E3x2 p1) = p1
|
||||
f (E3x3 p1) = p1
|
||||
ps' = lightningMids d pers ps
|
||||
pers = evalState (sequence $ repeat $ randInCirc 5) $ _randGen w
|
||||
(nc,g) = randomR (0::Int,11) $ _randGen w
|
||||
(nc,g) = randomR (0::Int,5) $ _randGen w
|
||||
theColor = f2 nc
|
||||
f2 0 = cyan
|
||||
f2 1 = azure
|
||||
@@ -452,7 +452,7 @@ createSpark time colid pos dir maycid w
|
||||
{ _ptDraw = drawBul
|
||||
, _ptUpdate' = mvGenBullet
|
||||
, _btVel' = rotateV dir (V2 5 0)
|
||||
, _btColor' = numColor colid
|
||||
, _btColor' = brightX 100 1.5 $ numColor colid
|
||||
, _btTrail' = [pos]
|
||||
, _btPassThrough' = maycid
|
||||
, _btWidth' = 1
|
||||
|
||||
@@ -50,6 +50,7 @@ module Picture
|
||||
, light
|
||||
, dark
|
||||
, bright
|
||||
, brightX
|
||||
, mixColors
|
||||
, zeroZ
|
||||
, setDepth
|
||||
@@ -381,6 +382,10 @@ dim :: Color -> Color
|
||||
{-# INLINE dim #-}
|
||||
dim (V4 r g b a) = V4 (r/1.2) (g/1.2) (b/1.2) a
|
||||
|
||||
brightX :: Float -> Float -> Color -> Color
|
||||
{-# INLINE brightX #-}
|
||||
brightX cm am (V4 r g b a) = V4 (r*cm) (g*cm) (b*cm) (a*am)
|
||||
|
||||
bright :: Color -> Color
|
||||
{-# INLINE bright #-}
|
||||
bright (V4 r g b a) = V4 (r*1.2) (g*1.2) (b*1.2) a
|
||||
|
||||
Reference in New Issue
Block a user