Disable filtering for charmap
This commit is contained in:
@@ -42,7 +42,6 @@ preloadRender = do
|
||||
setupVertexAttribPointer 0 4 8 0
|
||||
wpColVAOname <- genObjectName
|
||||
bindVertexArrayObject $= Just wpColVAOname
|
||||
bindBuffer ArrayBuffer $= Just wpVBOname
|
||||
setupVertexAttribPointer 0 4 8 0
|
||||
setupVertexAttribPointer 1 4 8 4
|
||||
let wpVAO = VAO {_vao = wpVAOname, _vaoVBO = wpVBO}
|
||||
@@ -92,8 +91,8 @@ preloadRender = do
|
||||
>>= addTextureArray "data/texture/ayene_wooden_floor.png"
|
||||
-- bind fixed vertex data
|
||||
bindShaderBuffers [fsShad,fullscreenAlphaHalveShad] [4,4]
|
||||
framebuf2 <- setupTextureFramebuffer 600 600
|
||||
framebuf3 <- setupTextureFramebuffer 600 600
|
||||
framebuf2 <- setupTextureFramebuffer 800 600
|
||||
framebuf3 <- setupTextureFramebuffer 800 600
|
||||
|
||||
rboLightingName <- genObjectName
|
||||
bindRenderbuffer Renderbuffer $= rboLightingName
|
||||
@@ -131,7 +130,7 @@ preloadRender = do
|
||||
, _fullscreenAlphaHalveShader = fullscreenAlphaHalveShad
|
||||
, _bloomBlurShader = bloomBlurShad
|
||||
, _colorBlurShader = colorBlurShad
|
||||
, _barrelShader = barrelShad
|
||||
, _barrelShader = barrelShad
|
||||
, _grayscaleShader = grayscaleShad
|
||||
, _fbo2 = framebuf2
|
||||
, _fbo3 = framebuf3
|
||||
|
||||
@@ -17,7 +17,7 @@ sizeFBOs
|
||||
-> Int -- ^ Lightmap height
|
||||
-> Int -- ^ Full width
|
||||
-> Int -- ^ Full height
|
||||
-> PreloadData a
|
||||
-> PreloadData a
|
||||
-> IO (PreloadData a)
|
||||
sizeFBOs xsize ysize xfull yfull pdata = do
|
||||
let rdata = _renderData pdata
|
||||
|
||||
@@ -40,13 +40,13 @@ addTextureNoFilter texturePath shad = do
|
||||
let tex = convertRGBA8 cmap
|
||||
textureOb <- genObjectName
|
||||
textureBinding Texture2D $= Just textureOb
|
||||
textureFilter Texture2D $= ((Nearest,Nothing) , Nearest)
|
||||
let texData = V.toList $ imageData tex
|
||||
wtex = fromIntegral $ imageWidth tex
|
||||
htex = fromIntegral $ imageHeight tex
|
||||
glTexStorage2D GL_TEXTURE_2D 1 GL_RGBA8 wtex htex
|
||||
withArray texData $ \ptr -> do
|
||||
glTexSubImage2D GL_TEXTURE_2D 0 0 0 wtex htex GL_RGBA GL_UNSIGNED_BYTE ptr
|
||||
textureFilter Texture2DArray $= ((Nearest,Nothing) , Nearest)
|
||||
return $ shad & shaderTexture ?~ ShaderTexture {_textureObject = textureOb}
|
||||
|
||||
addTextureArray :: String -> FullShader -> IO FullShader
|
||||
|
||||
Reference in New Issue
Block a user