Try to set glScissor more sensibly
Not sure what this should be yet though
This commit is contained in:
@@ -10,6 +10,7 @@ void main() {
|
||||
vec3 pos = texture(screenTexture, vTexPos).xyz;
|
||||
vec3 distVec = pos - lightPos.xyz;
|
||||
float dist = dot(distVec, distVec);
|
||||
// float dist = dot(distVec.xy, distVec.xy);
|
||||
// if (dist > rad) {
|
||||
// discard;
|
||||
// }
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user