Remove BloomNoZWrite layer
This commit is contained in:
@@ -1,20 +0,0 @@
|
|||||||
module Dodge.Beam.Draw where
|
|
||||||
|
|
||||||
import Dodge.Data.Beam
|
|
||||||
import Picture
|
|
||||||
|
|
||||||
drawBeam :: BeamDraw -> Beam -> Picture
|
|
||||||
drawBeam bd = case bd of
|
|
||||||
BasicBeamDraw -> basicDrawBeam
|
|
||||||
BeamDrawColor _ -> basicDrawBeam
|
|
||||||
|
|
||||||
basicDrawBeam :: Beam -> Picture
|
|
||||||
basicDrawBeam bm =
|
|
||||||
setLayer BloomNoZWrite $
|
|
||||||
fold
|
|
||||||
[ setDepth 19 . color (brightX 0 0.5 col) $ thickLine 20 ps
|
|
||||||
, setDepth 19.5 . color (brightX 10 1 col) $ thickLine 3 ps
|
|
||||||
]
|
|
||||||
where
|
|
||||||
col = _bmColor bm
|
|
||||||
ps = _bmFirstPoints bm
|
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
Rexports all Dodge.x.Draw files.
|
Rexports all Dodge.x.Draw files.
|
||||||
-}
|
-}
|
||||||
module Dodge.Draw (
|
module Dodge.Draw (
|
||||||
module Dodge.Beam.Draw,
|
|
||||||
-- module Dodge.Block.Draw,
|
|
||||||
module Dodge.Item.Draw,
|
module Dodge.Item.Draw,
|
||||||
module Dodge.Button.Draw,
|
module Dodge.Button.Draw,
|
||||||
module Dodge.EnergyBall.Draw,
|
module Dodge.EnergyBall.Draw,
|
||||||
@@ -21,9 +19,7 @@ module Dodge.Draw (
|
|||||||
module Dodge.Shockwave.Draw,
|
module Dodge.Shockwave.Draw,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Dodge.Beam.Draw
|
|
||||||
import Dodge.Item.Draw
|
import Dodge.Item.Draw
|
||||||
--import Dodge.Block.Draw
|
|
||||||
import Dodge.Button.Draw
|
import Dodge.Button.Draw
|
||||||
import Dodge.EnergyBall.Draw
|
import Dodge.EnergyBall.Draw
|
||||||
import Dodge.Flame.Draw
|
import Dodge.Flame.Draw
|
||||||
|
|||||||
@@ -27,10 +27,7 @@ drawExplosiveBall eb =
|
|||||||
|
|
||||||
drawStaticBall :: EnergyBall -> Picture
|
drawStaticBall :: EnergyBall -> Picture
|
||||||
drawStaticBall pt =
|
drawStaticBall pt =
|
||||||
setLayer BloomNoZWrite
|
setLayer BloomLayer
|
||||||
-- . setDepth 20
|
|
||||||
-- -- . setDepth (_ebZ pt + 20)
|
|
||||||
-- . uncurryV translate (_ebPos pt)
|
|
||||||
. translate3 (_ebPos pt)
|
. translate3 (_ebPos pt)
|
||||||
$ circleSolidCol blue (withAlpha 0.5 white) 8
|
$ circleSolidCol blue (withAlpha 0.5 white) 8
|
||||||
|
|
||||||
@@ -38,8 +35,8 @@ drawFlamelet :: Float -> EnergyBall -> Picture
|
|||||||
drawFlamelet size pt =
|
drawFlamelet size pt =
|
||||||
fold
|
fold
|
||||||
[ setLayer BloomLayer pic
|
[ setLayer BloomLayer pic
|
||||||
, setLayer BloomNoZWrite piu
|
, setLayer BloomLayer piu -- was NoZWrite
|
||||||
, setLayer BloomNoZWrite pi2
|
, setLayer BloomLayer pi2 -- was NoZWrite
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
sp = _ebPos pt
|
sp = _ebPos pt
|
||||||
|
|||||||
@@ -692,7 +692,7 @@ flareCircleAt :: Color -> Float -> Point3 -> World -> World
|
|||||||
flareCircleAt col alphax tranv =
|
flareCircleAt col alphax tranv =
|
||||||
cWorld . lWorld . flares
|
cWorld . lWorld . flares
|
||||||
<>~ setLayer
|
<>~ setLayer
|
||||||
BloomNoZWrite
|
BloomLayer -- was NoZWrite
|
||||||
( translate3 tranv $
|
( translate3 tranv $
|
||||||
circleSolidCol (withAlpha 0 0) (withAlpha alphax col) 50
|
circleSolidCol (withAlpha 0 0) (withAlpha alphax col) 50
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -135,7 +135,8 @@ ammoMagSPic it = \case
|
|||||||
CHEMFUELPOUCH -> noPic $ colorSH yellow (upperBox Small Typical 3 $ polyCirc 3 5)
|
CHEMFUELPOUCH -> noPic $ colorSH yellow (upperBox Small Typical 3 $ polyCirc 3 5)
|
||||||
BATTERY ->
|
BATTERY ->
|
||||||
colorSH blue (upperBox Tiny Superfluous 1 (rectNSWE 0 (-2) (-2) 2))
|
colorSH blue (upperBox Tiny Superfluous 1 (rectNSWE 0 (-2) (-2) 2))
|
||||||
:!: setLayer BloomNoZWrite (setDepth 2 . color (mixColorsFrac green red am) $ circleSolid 2)
|
:!: setLayer BloomLayer (setDepth 2 . color (mixColorsFrac green red am) $ circleSolid 2)
|
||||||
|
-- was nozwrite
|
||||||
_ -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- y) (-1) 1)
|
_ -> noPic $ upperPrismPolyTS 1 (rectNSWE 0 (- y) (-1) 1)
|
||||||
where
|
where
|
||||||
y = fromIntegral y' * 0.3
|
y = fromIntegral y' * 0.3
|
||||||
@@ -412,28 +413,6 @@ teslaGunPic = shatterGunSPic
|
|||||||
lasGunPic :: Item -> SPic
|
lasGunPic :: Item -> SPic
|
||||||
lasGunPic _ = noPic $ colorSH blue $ upperPrismPolyST 3 $ square 4
|
lasGunPic _ = noPic $ colorSH blue $ upperPrismPolyST 3 $ square 4
|
||||||
|
|
||||||
-- colorSH
|
|
||||||
-- blue
|
|
||||||
-- ( upperBoxST 4 (rectNSWE 3 1 0 30)
|
|
||||||
-- <> upperBoxSU 4 (rectNSWE (-1) (-3) 0 30)
|
|
||||||
-- <> upperBoxSU 1 (rectNSWE 3 (-3) 0 30)
|
|
||||||
-- )
|
|
||||||
-- :!: mempty
|
|
||||||
|
|
||||||
--dualBeamPic :: Item -> SPic
|
|
||||||
--dualBeamPic it =
|
|
||||||
-- ( colorSH blue $
|
|
||||||
-- upperBoxST 4 (rectNESW gap 3 (- gap) 1)
|
|
||||||
-- <> upperBoxSU 4 (rectNESW gap (-1) (- gap) (-3))
|
|
||||||
-- <> upperBoxSU 1 (rectNESW gap 3 (- gap) (-3))
|
|
||||||
-- , setLayer BloomNoZWrite . color col . setDepth 1.1 . polygon $ rectNESW gap 1 (- gap) (-1)
|
|
||||||
-- )
|
|
||||||
-- where
|
|
||||||
-- --amFrac = fractionLoadedAmmo it
|
|
||||||
-- amFrac = 0.5
|
|
||||||
-- col = brightX 2 1.5 $ mixColors amFrac (1 - amFrac) green red
|
|
||||||
-- gap = _dbGap (_itParams it) - 3
|
|
||||||
|
|
||||||
tractorGunPic :: Item -> SPic
|
tractorGunPic :: Item -> SPic
|
||||||
tractorGunPic = lasGunPic
|
tractorGunPic = lasGunPic
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ updateLaser w pt =
|
|||||||
|
|
||||||
drawLaser :: Color -> [Point2] -> Picture
|
drawLaser :: Color -> [Point2] -> Picture
|
||||||
drawLaser col =
|
drawLaser col =
|
||||||
setLayer BloomNoZWrite
|
setLayer BloomLayer -- was nozwrite
|
||||||
. setDepth 19.5
|
. setDepth 19.5
|
||||||
. color (brightX 10 1 col)
|
. color (brightX 10 1 col)
|
||||||
. thickLine 3
|
. thickLine 3
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ drawLightSource :: LightSource -> Picture
|
|||||||
drawLightSource = defLSPic
|
drawLightSource = defLSPic
|
||||||
|
|
||||||
defLSPic :: LightSource -> Picture
|
defLSPic :: LightSource -> Picture
|
||||||
defLSPic ls = setLayer BloomNoZWrite . translate3 (_lsPos $ _lsParam ls) . color col $ circleSolid 4
|
defLSPic ls = setLayer BloomLayer . translate3 (_lsPos $ _lsParam ls) . color col $ circleSolid 4
|
||||||
|
-- was nozwrite
|
||||||
where
|
where
|
||||||
col = V4 r g b 2
|
col = V4 r g b 2
|
||||||
V3 r g b = _lsCol $ _lsParam ls
|
V3 r g b = _lsCol $ _lsParam ls
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ drawShell mcol pj =
|
|||||||
where
|
where
|
||||||
thelight =
|
thelight =
|
||||||
foldMap
|
foldMap
|
||||||
(\col -> setLayer BloomNoZWrite . setDepth 4.5 . color col $ circleSolid 3)
|
(\col -> setLayer BloomLayer . setDepth 4.5 . color col $ circleSolid 3)
|
||||||
mcol
|
mcol
|
||||||
|
|
||||||
shellShape :: Shape
|
shellShape :: Shape
|
||||||
|
|||||||
+3
-2
@@ -174,6 +174,7 @@ doDrawing' win pdata u = do
|
|||||||
glBlendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
|
glBlendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
|
||||||
glUseProgram (pdata ^. fullscreenShader)
|
glUseProgram (pdata ^. fullscreenShader)
|
||||||
glDrawArrays GL_TRIANGLES 0 6
|
glDrawArrays GL_TRIANGLES 0 6
|
||||||
|
-- no longer need lighting texture
|
||||||
with GL_COLOR_ATTACHMENT0 $
|
with GL_COLOR_ATTACHMENT0 $
|
||||||
glInvalidateNamedFramebufferData (pdata ^. fboLighting . _1 . unFBO) 1
|
glInvalidateNamedFramebufferData (pdata ^. fboLighting . _1 . unFBO) 1
|
||||||
--draw bloom onto bloom buffer
|
--draw bloom onto bloom buffer
|
||||||
@@ -184,8 +185,8 @@ doDrawing' win pdata u = do
|
|||||||
--glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
|
--glBlendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
|
||||||
--glBlendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
|
--glBlendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA
|
||||||
glBlendFunc GL_ONE GL_ONE
|
glBlendFunc GL_ONE GL_ONE
|
||||||
glDepthMask GL_FALSE
|
-- glDepthMask GL_FALSE
|
||||||
renderLayer BloomNoZWrite shadV pokeCounts
|
-- renderLayer BloomNoZWrite shadV pokeCounts
|
||||||
glDepthMask GL_TRUE
|
glDepthMask GL_TRUE
|
||||||
renderLayer BloomLayer shadV pokeCounts
|
renderLayer BloomLayer shadV pokeCounts
|
||||||
-- draw clouds to block bloom particles, transparency blocks some alpha
|
-- draw clouds to block bloom particles, transparency blocks some alpha
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Linear
|
|||||||
|
|
||||||
drawSpark :: Spark -> Picture
|
drawSpark :: Spark -> Picture
|
||||||
drawSpark pt =
|
drawSpark pt =
|
||||||
setLayer BloomNoZWrite
|
setLayer BloomLayer -- was nozwrite
|
||||||
. setDepth 20
|
. setDepth 20
|
||||||
. color (skColor pt)
|
. color (skColor pt)
|
||||||
$ thickLine 3 [_skOldPos pt, _skPos pt, _skPos pt + _skVel pt]
|
$ thickLine 3 [_skOldPos pt, _skPos pt, _skPos pt + _skVel pt]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import Control.Lens
|
|||||||
|
|
||||||
drawTeslaArc :: TeslaArc -> Picture
|
drawTeslaArc :: TeslaArc -> Picture
|
||||||
drawTeslaArc pt =
|
drawTeslaArc pt =
|
||||||
setLayer BloomNoZWrite $
|
setLayer BloomLayer $ -- was nozwrite
|
||||||
fold
|
fold
|
||||||
[ setDepth 20.5 $ color (brightX 2 1 $ _taColor pt) $ thickLine x ps
|
[ setDepth 20.5 $ color (brightX 2 1 $ _taColor pt) $ thickLine x ps
|
||||||
-- , setDepth 20 $ color (V4 0 0 0 0.5) $ thickLine 10 ps
|
-- , setDepth 20 $ color (V4 0 0 0 0.5) $ thickLine 10 ps
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ drawTractorBeam = tractorSPic
|
|||||||
|
|
||||||
tractorSPic :: TractorBeam -> Picture
|
tractorSPic :: TractorBeam -> Picture
|
||||||
tractorSPic pj =
|
tractorSPic pj =
|
||||||
setLayer BloomNoZWrite $
|
setLayer BloomLayer $
|
||||||
setDepth 20 $
|
setDepth 20 $
|
||||||
color (withAlpha 0.5 col) $
|
color (withAlpha 0.5 col) $
|
||||||
polygon
|
polygon
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ data Verx = Verx
|
|||||||
|
|
||||||
data Layer
|
data Layer
|
||||||
= BloomLayer
|
= BloomLayer
|
||||||
| BloomNoZWrite
|
-- | BloomNoZWrite
|
||||||
| DebugLayer
|
| DebugLayer
|
||||||
| FixedCoordLayer
|
| FixedCoordLayer
|
||||||
deriving (Eq, Ord, Enum, Bounded, Show, Read) --Generic, Flat)
|
deriving (Eq, Ord, Enum, Bounded, Show, Read) --Generic, Flat)
|
||||||
|
|||||||
Reference in New Issue
Block a user