Work out screen coordinates for connecting infobox

This commit is contained in:
2022-04-10 11:32:05 +01:00
parent 77c3f83d20
commit 0cc12f31ad
9 changed files with 41 additions and 43 deletions
+7 -7
View File
@@ -116,7 +116,7 @@ doDrawing pdata u = do
then renderTextureWalls pdata nWalls
else renderBlankWalls pdata nWalls
--draw object pictures onto base buffer
renderLayer 0 shadV layerCounts
renderLayer BottomLayer shadV layerCounts
--draw object shapes onto base buffer
let fs = _shapeShader pdata
currentProgram $= Just (_shadProg fs)
@@ -146,9 +146,9 @@ doDrawing pdata u = do
depthFunc $= Just Less
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
depthMask $= Disabled
renderLayer 3 shadV layerCounts
renderLayer BloomNoZWrite shadV layerCounts
depthMask $= Enabled
renderLayer 1 shadV layerCounts
renderLayer BloomLayer shadV layerCounts
--depthMask $= Enabled
--setup downscale viewport for blurring bloom
setViewportSize (round winx `div` (2*resFact)) (round winy `div` (2*resFact))
@@ -171,7 +171,7 @@ doDrawing pdata u = do
blendFuncSeparate $= ((SrcAlpha,OneMinusSrcAlpha),(One,OneMinusSrcAlpha))
drawBuffers $= [FBOColorAttachment 0,NoBuffers]
clear [ColorBuffer]
renderLayer 2 shadV layerCounts
renderLayer MidLayer shadV layerCounts
--renderWindows pdata windowPoints
drawShader (_windowShader pdata) nWins
when (_cloud_shadows cfig) $ do
@@ -179,7 +179,7 @@ doDrawing pdata u = do
depthMask $= Enabled
blend $= Disabled
drawBuffers $= [NoBuffers,FBOColorAttachment 1]
renderLayer 2 shadV layerCounts
renderLayer MidLayer shadV layerCounts
drawShader (_windowShader pdata) nWins
----draw lightmap for cloud buffer
depthMask $= Disabled
@@ -237,14 +237,14 @@ doDrawing pdata u = do
depthFunc $= Just Always
blend $= Enabled
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
renderLayer 5 shadV layerCounts
renderLayer DebugLayer shadV layerCounts
-- draw overlay
depthFunc $= Just Always
depthMask $= Disabled
blend $= Enabled
blendFunc $= (SrcAlpha,OneMinusSrcAlpha)
renderLayer 4 shadV layerCounts
bufferUBO $ isoMatrix 0 1 (V2 0 0) (V2 2 2)
renderLayer FixedCoordLayer shadV layerCounts
renderFoldable shadV $ fixedCoordPictures u
depthMask $= Enabled
eTicks <- SDL.ticks