Add normal maps to the floor

This commit is contained in:
2023-03-17 16:51:02 +00:00
parent 6425ef3f0a
commit 850fdf1783
16 changed files with 52 additions and 55 deletions
+10 -1
View File
@@ -160,7 +160,16 @@ doDrawing' win pdata u = do
nullPtr
-- glDisable GL_CULL_FACE
--draw floor onto base buffer
drawShader (fst $ _textureArrayShader pdata) nFls
glDisable GL_BLEND
glUseProgram (pdata ^. textureArrayShader . _1 . shadName)
glBindVertexArray $ pdata ^. textureArrayShader . _1 . shadVAO . vaoName
glBindTextureUnit 1 (pdata ^. toNormalMaps . unTO)
glBindTextureUnit 0 $ pdata ^?! textureArrayShader . _1 . shadTex' . _Just . textureObject
glDrawArrays
(marshalEPrimitiveMode $ pdata ^. textureArrayShader . _1 . shadPrim' )
0
(fromIntegral nFls)
glEnable GL_BLEND
--draw lightmap into its own buffer
createLightMap
cfig