Add normal maps to the floor
This commit is contained in:
+10
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user