Tweak flamer flame drawing

This commit is contained in:
2021-08-28 16:52:38 +01:00
parent c36654520d
commit 5089403038
2 changed files with 18 additions and 16 deletions
+14 -11
View File
@@ -105,18 +105,22 @@ doDrawing pdata w = do
bindFramebuffer Framebuffer $= fst (_fboBloom pdata)
clear [ColorBuffer]
--blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
renderLayer 1 shadV layerCounts
bindFramebuffer Framebuffer $= fst (_fboColor pdata)
clear [ColorBuffer]
--blendEquation $= Max
depthMask $= Disabled
renderLayer 3 shadV layerCounts
renderLayer 4 shadV layerCounts
renderLayer 5 shadV layerCounts
depthMask $= Enabled
renderLayer 1 shadV layerCounts
-- bindFramebuffer Framebuffer $= fst (_fboColor pdata)
-- clear [ColorBuffer]
-- depthMask $= Disabled
-- blendEquation $= FuncAdd
-- renderLayer 3 shadV layerCounts
-- renderLayer 4 shadV layerCounts
-- renderLayer 5 shadV layerCounts
--
-- depthMask $= Enabled
-- this is not ideal if the original is not divisible by 2
viewport $= (Position 0 0
, divideSize (2 * (w ^. config . shadow_resolution)) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
@@ -149,9 +153,8 @@ doDrawing pdata w = do
drawShader (_fullscreenShader pdata) 4
blendFunc $= (SrcAlpha, OneMinusSrcAlpha)
textureBinding Texture2D $= Just (snd $ _fboColor pdata)
drawShader (_colorBlurShader pdata) 4
--textureBinding Texture2D $= Just (snd3 $ _fbo2 pdata)
--textureBinding Texture2D $= Just (snd $ _fboColor pdata)
--drawShader (_colorBlurShader pdata) 4
blendFunc $= (SrcAlpha, One)
textureBinding Texture2D $= Just (snd $ _fboFourth1 pdata)
drawShader (_fullscreenShader pdata) 4
+4 -5
View File
@@ -51,7 +51,6 @@ aFlameParticle t pos vel maycid = Pt'
, _btTimer' = t
, _btHitEffect' = destroyOnImpact (doFlameDam 1) noEff noEff
}
drawFlame
:: Point2 -- ^ Rotate direction
-> Particle -> Picture
@@ -60,8 +59,8 @@ drawFlame rotd pt = thePic
ep = _btPos' pt
thePic = pictures
[ glow
, aPic 1 prot2 18 (V2 (scaleChange + 1) 2 ) $ V4 2 (-1) (-1) 0.5
, aPic 1 prot 19 (V2 (scaleChange + 0.5) 1) $ V4 1 0.5 0 2
, aPic 3 prot2 25 (V2 (scaleChange + 1) 2 ) $ V4 2 (-1) (-1) 0.5
, aPic 3 prot 22 (V2 (scaleChange + 0.5) 1) $ V4 1 0.5 0 2
, aPic 1 prot3 20 (V2 scaleChange 0.5 ) $ V4 1 1 1 1
]
aPic :: Int -> (Point2 -> Point2) -> Float -> Point2 -> Color -> Picture
@@ -171,8 +170,8 @@ drawFlameletZ rot pt = pictures
--, setLayer 4 pi2
--, setLayer 3 piu
[ setLayer 1 pic
, setLayer 1 pi2
, setLayer 1 piu
, setLayer 3 piu
, setLayer 3 pi2
--, setLayer 1 glow
]
where