Allow for downscaled resolution
This commit is contained in:
+5
-2
@@ -65,6 +65,8 @@ doDrawing pdata w = do
|
|||||||
]
|
]
|
||||||
-- set the coordinate uniform ready for drawing elements using world coordinates
|
-- set the coordinate uniform ready for drawing elements using world coordinates
|
||||||
bufferUBO $ perspectiveMatrixb rot camzoom trans wins viewFroms
|
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)
|
bindFramebuffer Framebuffer $= fst (_fboBase pdata)
|
||||||
clearColor $= Color4 0 0 0 0
|
clearColor $= Color4 0 0 0 0
|
||||||
clear [ColorBuffer,DepthBuffer]
|
clear [ColorBuffer,DepthBuffer]
|
||||||
@@ -104,14 +106,14 @@ doDrawing pdata w = do
|
|||||||
blend $= Disabled
|
blend $= Disabled
|
||||||
drawShader (_bloomBlurShader pdata) 4
|
drawShader (_bloomBlurShader pdata) 4
|
||||||
replicateM_ 3 $ pingPongBetween (_fboFourth1 pdata) (_fboFourth2 pdata) (_bloomBlurShader pdata)
|
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
|
blend $= Enabled
|
||||||
|
|
||||||
bindFramebuffer Framebuffer $= fst (_fboLighting pdata)
|
bindFramebuffer Framebuffer $= fst (_fboLighting pdata)
|
||||||
viewport $= (Position 0 0
|
viewport $= (Position 0 0
|
||||||
, divideSize (w ^. config . shadow_resolution) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
|
, divideSize (w ^. config . shadow_resolution) $ Size (round $ fstV2 wins) (round $ sndV2 wins))
|
||||||
createLightMap pdata lightPoints nWalls nSils nsurfVs
|
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
|
colorMask $= Color4 Enabled Enabled Enabled Enabled
|
||||||
clearColor $= Color4 0 0 0 0
|
clearColor $= Color4 0 0 0 0
|
||||||
|
|
||||||
@@ -141,6 +143,7 @@ doDrawing pdata w = do
|
|||||||
renderLayer 2 shadV layerCounts
|
renderLayer 2 shadV layerCounts
|
||||||
renderWindows pdata windowPoints
|
renderWindows pdata windowPoints
|
||||||
|
|
||||||
|
viewport $= (Position 0 0, Size (round $ fstV2 wins) (round $ sndV2 wins))
|
||||||
depthFunc $= Just Always
|
depthFunc $= Just Always
|
||||||
blendFunc $= (One,Zero)
|
blendFunc $= (One,Zero)
|
||||||
-- perform any radial distortion
|
-- perform any radial distortion
|
||||||
|
|||||||
Reference in New Issue
Block a user