Add num_shadow_casters graphics parameter, allow cycle down enum options
This commit is contained in:
+3
-3
@@ -63,14 +63,14 @@ createLightMap pdata lightPoints nWalls nSils nCaps drawObjShads toPos drawCPUSh
|
||||
-- to consider: adding normals/a "material" for each fragment
|
||||
blendFunc $= (Zero, OneMinusSrcColor)
|
||||
stencilTest $= Enabled
|
||||
stencilOpSeparate Front $= (OpKeep, OpKeep, OpIncrWrap)
|
||||
stencilOpSeparate Back $= (OpKeep, OpKeep, OpDecrWrap)
|
||||
flip VFSM.mapM_ (VFSM.fromList lightPoints) $ \(V3 x y z, rad, V3 r g b) -> do
|
||||
depthFunc $= Just Less
|
||||
-- setup stencil
|
||||
colorMask $= Color4 Disabled Disabled Disabled Disabled
|
||||
clear [StencilBuffer]
|
||||
cullFace $= Nothing
|
||||
stencilOpSeparate Front $= (OpKeep, OpKeep, OpIncrWrap)
|
||||
stencilOpSeparate Back $= (OpKeep, OpKeep, OpDecrWrap)
|
||||
stencilFunc $= (Always, 0, 255)
|
||||
--draw wall shadows
|
||||
currentProgram $= Just (_shadProg lwallShad)
|
||||
@@ -110,7 +110,7 @@ createLightMap pdata lightPoints nWalls nSils nCaps drawObjShads toPos drawCPUSh
|
||||
-- bind world position texture
|
||||
bindTO toPos
|
||||
colorMask $= Color4 Enabled Enabled Enabled Enabled
|
||||
stencilOp $= (OpKeep, OpKeep, OpKeep)
|
||||
--stencilOp $= (OpKeep, OpKeep, OpKeep)
|
||||
stencilFunc $= (Equal, 0, 255)
|
||||
currentProgram $= ltextShad ^? shadProg --Just (_shadProg ltextShad)
|
||||
uniform (_shadUnis ltextShad V.! 0) $= Vector3 x y z
|
||||
|
||||
Reference in New Issue
Block a user