Unify option menu display and effects

This commit is contained in:
2021-09-03 12:38:56 +01:00
parent 083000c103
commit 6a2df15d0d
5 changed files with 117 additions and 39 deletions
-11
View File
@@ -72,8 +72,6 @@ doDrawing pdata w = do
-- set the coordinate uniform ready for drawing elements using world coordinates
bufferUBO $ perspectiveMatrixb rot camzoom trans wins viewFroms
setViewportSize (round winx `div` resFact) (round winy `div` resFact)
-- viewport $= (Position 0 0
-- , divideSize (w ^. config . resolution_factor) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
bindFramebuffer Framebuffer $= fst (_fboBase pdata)
clearColor $= Color4 0 0 0 0
clear [ColorBuffer,DepthBuffer]
@@ -120,8 +118,6 @@ doDrawing pdata w = do
--depthMask $= Enabled
--setup downscale viewport for blurring bloom
setViewportSize (round winx `div` (2*resFact)) (round winy `div` (2*resFact))
-- viewport $= (Position 0 0
-- , divideSize (2 * (w ^. config . resolution_factor)) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
bindFramebuffer Framebuffer $= fst (_fboHalf1 pdata)
depthFunc $= Just Always
textureBinding Texture2D $= Just (snd $ _fboBloom pdata)
@@ -130,8 +126,6 @@ doDrawing pdata w = do
replicateM_ 5 $ pingPongBetween (_fboHalf1 pdata) (_fboHalf2 pdata) (_bloomBlurShader pdata)
blend $= Enabled
setViewportSize (round winx `div` resFact) (round winy `div` resFact)
-- viewport $= (Position 0 0
-- , divideSize (w ^. config . resolution_factor) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
--draw clouds
bindFramebuffer Framebuffer $= fst (_fboCloud pdata)
depthFunc $= Just Lequal
@@ -150,14 +144,10 @@ doDrawing pdata w = do
renderLayer 2 shadV layerCounts
renderWindows pdata windowPoints
-- --downscale transparency depths
-- viewport $= (Position 0 0
-- , divideSize (2 * (w ^. config . shadow_resolution)) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
-- bindFramebuffer Framebuffer $= fst (_fboHalf3 pdata)
-- bindTO (snd $ snd $ _fboCloud pdata)
-- depthFunc $= Just Always
-- drawShader (_fullscreenShader pdata) 4
-- viewport $= (Position 0 0
-- , divideSize (w ^. config . shadow_resolution) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
----draw lightmap for cloud buffer
depthMask $= Disabled
blend $= Enabled
@@ -190,7 +180,6 @@ doDrawing pdata w = do
drawShader (_fullscreenShader pdata) 4
--set viewport for radial distortion
setViewportSize (round winx) (round winy)
--viewport $= (Position 0 0, Size (round $ fstV2 wins) (round $ sndV2 wins))
depthFunc $= Just Always
blendFunc $= (One,Zero)
-- perform any radial distortion