Add MatrixHelper folder
This commit is contained in:
@@ -76,10 +76,12 @@ renderPicture' pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints
|
||||
) :: IO (GLmatrix GLfloat)
|
||||
uniform ( (fromJust $ _shaderCustomUnis $ _wallShadowShader pdata) !! 1)
|
||||
$= pmat
|
||||
cullFace $= Just Back
|
||||
drawShader (_wallShadowShader pdata) nWalls
|
||||
|
||||
depthMask $= Disabled
|
||||
blendFuncSeparate $= ((Zero,Zero),(Zero, OneMinusSrcAlpha))
|
||||
blendFunc $= (Zero, OneMinusSrcAlpha)
|
||||
-- blendFuncSeparate $= ((Zero,Zero),(Zero, OneMinusSrcAlpha))
|
||||
stencilTest $= Enabled
|
||||
forM_ lightPoints $ \(x,y,r,lum) -> do
|
||||
-- depthFunc $= Just Less
|
||||
@@ -91,13 +93,13 @@ renderPicture' pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints
|
||||
-- currentProgram does get called twice: here and inside drawShader below
|
||||
currentProgram $= Just (_shaderProgram $ _wallShadowShader pdata)
|
||||
uniform (head $ fromJust $ _shaderCustomUnis $ _wallShadowShader pdata)
|
||||
$= Vector2 (x) (y)
|
||||
$= Vector2 x y
|
||||
-- blendFunc $= (Zero,One)
|
||||
drawShader (_wallShadowShader pdata) nWalls
|
||||
|
||||
cullFace $= Just Front
|
||||
stencilOp $= (OpKeep,OpKeep,OpDecr)
|
||||
drawShader (_wallShadowShader pdata) nWalls
|
||||
-- cullFace $= Just Front
|
||||
-- stencilOp $= (OpKeep,OpKeep,OpDecr)
|
||||
-- drawShader (_wallShadowShader pdata) nWalls
|
||||
|
||||
cullFace $= Nothing
|
||||
|
||||
@@ -107,9 +109,7 @@ renderPicture' pdata rot zoom (tranx,trany) (winx,winy) wallPoints lightPoints
|
||||
zTran (a,b) = (a*2*zoom / winx, b*2*zoom / winy)
|
||||
pokeFourOff lightPtr 0 (x',y',r,lum)
|
||||
bindShaderBuffers [_lightSourceShader pdata] [1]
|
||||
|
||||
stencilFunc $= (Equal, 0, 255)
|
||||
-- depthFunc $= Just Always
|
||||
drawShader (_lightSourceShader pdata) 1
|
||||
|
||||
-- currentProgram $= Just (_shaderProgram $ _wallLightShader pdata)
|
||||
|
||||
Reference in New Issue
Block a user