Bind some fixed texture arrays only once
This commit is contained in:
+1
-4
@@ -179,9 +179,6 @@ doDrawing' win pdata u = do
|
||||
--draw floor onto base buffer
|
||||
glUseProgram (pdata ^. floorShader . shaderUINT)
|
||||
glBindVertexArray $ pdata ^. floorShader . shaderVAO . vaoName
|
||||
glBindTextureUnit 1 (pdata ^. toNormalMaps . unTO)
|
||||
--glTextureParameteri (pdata ^. toNormalMaps . unTO) GL_TEXTURE_BASE_LEVEL 3
|
||||
glBindTextureUnit 2 (pdata ^. toDiffuse . unTO)
|
||||
glDrawArrays
|
||||
(_unPrimitiveMode $ pdata ^. floorShader . shaderPrimitive )
|
||||
0
|
||||
@@ -227,7 +224,7 @@ doDrawing' win pdata u = do
|
||||
setViewportSize (round winx `div` (2 * resFact)) (round winy `div` (2 * resFact))
|
||||
glBindFramebuffer GL_FRAMEBUFFER (_unFBO (fst (_fboHalf1 pdata)))
|
||||
glDepthFunc GL_ALWAYS
|
||||
glBindTexture GL_TEXTURE_2D (pdata ^. fboBloom . _2 . unTO)
|
||||
glBindTextureUnit 0 (pdata ^. fboBloom . _2 . unTO)
|
||||
glDisable GL_BLEND
|
||||
drawShader (_bloomBlurShader pdata) 4
|
||||
replicateM_ 9 $ pingPongBetween (_fboHalf1 pdata) (_fboHalf2 pdata) (_bloomBlurShader pdata)
|
||||
|
||||
Reference in New Issue
Block a user