Commit before messing around with shaders

This commit is contained in:
2022-06-16 14:02:21 +01:00
parent 2bc30d0a6b
commit 55341f7caf
7 changed files with 17 additions and 15 deletions
+6 -6
View File
@@ -40,7 +40,7 @@ createLightMap pdata lightPoints nWalls nSils nCaps drawObjShads toPos = do
let llsShad = _lightingLineShadowShader pdata
let lcShad = _lightingCapShader pdata
let lwShad = _lightingWallShadShader pdata
let flShad = _fullLightingShader pdata
let ltShad = _lightingTextureShader pdata
-- we assume that the renderbuffer's depth has been correctly set elsewhere
-- we will not be changing that here
depthMask $= Disabled
@@ -100,14 +100,14 @@ createLightMap pdata lightPoints nWalls nSils nCaps drawObjShads toPos = do
colorMask $= Color4 Enabled Enabled Enabled Enabled
stencilOp $= (OpKeep,OpKeep,OpKeep)
stencilFunc $= (Equal, 0, 255)
currentProgram $= Just (_shadProg flShad)
uniform (head $ _shadUnis flShad)
currentProgram $= Just (_shadProg ltShad)
uniform (head $ _shadUnis ltShad)
$= Vector3 x y z
uniform (_shadUnis flShad !! 1)
uniform (_shadUnis ltShad !! 1)
$= Vector4 r g b rad
bindVertexArrayObject $= Just (_vao $ _shadVAO flShad)
bindVertexArrayObject $= Just (_vao $ _shadVAO ltShad)
glDrawArrays
(marshalEPrimitiveMode (_shadPrim flShad))
(marshalEPrimitiveMode (_shadPrim ltShad))
0
(fromIntegral (4::Int))
--cleanup: may not be necessary, depending on what comes after...