Play with floor textures

This commit is contained in:
2023-03-18 22:31:24 +00:00
parent 49f96ab18e
commit 70c15fea5d
12 changed files with 68 additions and 33 deletions
+7 -6
View File
@@ -166,13 +166,14 @@ preloadRender = do
wallTextureShad <-
makeShaderUsingVAO "wall/texture" [vert, geom, frag] EPoints wpColVAO
>>= addSamplerTexture2D "data/texture/grayscaleDirt.png"
---- texture array shader
textArrayShad <-
makeShader "texture/arrayPos" [vert, frag] [3, 3] ETriangles
>>= addTextureArray "data/texture/ayene_wooden_floor_transformed.png"
let floorverxstrd = 8
floorvbo <- setupVBO' floorverxstrd
floorshader <- makeShader4 "floor/arrayPos" [vert, frag] [4,4] floorverxstrd ETriangles floorvbo
putStrLn "a"
tonormalmap <- initTexture2DArray 3 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR "data/normalMaps/normalArray.png"
todiffusemap <- initTexture2DArray 3 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR "data/normalMaps/diffuseArray.png"
checkGLError
putStrLn "b"
-- bind fixed vertex data
bufferPokedVBO (snd fsShad) 4
framebuf2 <- setupTextureFramebuffer 800 600
@@ -212,7 +213,6 @@ preloadRender = do
, eslist
]
initializeGLState
tonormalmap <- initTexture 3 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR "data/normalMaps/attachedPanel.png"
return $
RenderData
{ _pictureShaders = shadV
@@ -231,7 +231,7 @@ preloadRender = do
, _wallBlankShader = wallBlankShad
, _wallTextureShader = wallTextureShad
, _windowShader = wallBlankShad{_shadVAO = winColVAO}
, _textureArrayShader = textArrayShad
-- , _textureArrayShader = textArrayShad
, _fullscreenShader = fsShad
, _lightingTextureShader = lightingTextureShad
, _bloomBlurShader = bloomBlurShad
@@ -259,6 +259,7 @@ preloadRender = do
, _floorVBO = floorvbo
, _floorShader = floorshader
, _toNormalMaps = tonormalmap
, _toDiffuse = todiffusemap
}
--------------------end preloadRender