Allow for downscaled resolution

This commit is contained in:
jgk
2021-08-19 20:18:24 +02:00
parent 8e3bf3b19f
commit a6be1007a6
+5 -2
View File
@@ -65,6 +65,8 @@ doDrawing pdata w = do
]
-- set the coordinate uniform ready for drawing elements using world coordinates
bufferUBO $ perspectiveMatrixb rot camzoom trans wins viewFroms
viewport $= (Position 0 0
, divideSize (w ^. config . shadow_resolution) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
bindFramebuffer Framebuffer $= fst (_fboBase pdata)
clearColor $= Color4 0 0 0 0
clear [ColorBuffer,DepthBuffer]
@@ -104,14 +106,14 @@ doDrawing pdata w = do
blend $= Disabled
drawShader (_bloomBlurShader pdata) 4
replicateM_ 3 $ pingPongBetween (_fboFourth1 pdata) (_fboFourth2 pdata) (_bloomBlurShader pdata)
viewport $= (Position 0 0, Size (round $ fstV2 wins) (round $ sndV2 wins))
-- viewport $= (Position 0 0, Size (round $ fstV2 wins) (round $ sndV2 wins))
blend $= Enabled
bindFramebuffer Framebuffer $= fst (_fboLighting pdata)
viewport $= (Position 0 0
, divideSize (w ^. config . shadow_resolution) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
createLightMap pdata lightPoints nWalls nSils nsurfVs
viewport $= (Position 0 0, Size (round $ fstV2 wins) (round $ sndV2 wins))
--viewport $= (Position 0 0, Size (round $ fstV2 wins) (round $ sndV2 wins))
colorMask $= Color4 Enabled Enabled Enabled Enabled
clearColor $= Color4 0 0 0 0
@@ -141,6 +143,7 @@ doDrawing pdata w = do
renderLayer 2 shadV layerCounts
renderWindows pdata windowPoints
viewport $= (Position 0 0, Size (round $ fstV2 wins) (round $ sndV2 wins))
depthFunc $= Just Always
blendFunc $= (One,Zero)
-- perform any radial distortion