Try to set glScissor more sensibly

Not sure what this should be yet though
This commit is contained in:
2025-11-29 15:28:51 +00:00
parent 974f3e96c9
commit 6ebf3f4ef7
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ data Config = Config
, _gr_downsize_res :: ResFactor
, _gr_world_res :: ResFactor
, _gr_num_shadow_casters :: NumShadowCasters
, _windowX :: Int --size
, _windowX :: Int --size in pixels
, _windowY :: Int
, _windowPosX :: Int --position in os
, _windowPosY :: Int
+2 -1
View File
@@ -162,7 +162,8 @@ renderShadows isclouds cam cfig shadrendertype nWalls nSils nCaps positiontextur
flip VFSM.mapM_ (VFSM.fromList lightPoints) $ \(V3 x y z, rad, V3 r g b) -> do
withArray [x,y,z,1,r,g,b,rad] $ glNamedBufferSubData (pdata ^. lightUBO) 0 32
-- note that the stencil shadows rely on the depth buffer
let d = rad * cam ^. camZoom
let d = 0.5 * rad * cam ^. camZoom -- rad * cam ^. camZoom
-- I don't know how this should be multiplied
V2 x' y' = worldPosToResOffset cfig cam (V2 x y)
-- this is probably too strict, it will be possible for high up lights
-- to have some of their light cast high up cut off