Work on distortion shader
This commit is contained in:
@@ -127,7 +127,14 @@ preloadRender = do
|
||||
transcompshader <- makeSourcedShader "fullscreen/transparencyComp" [vert, frag]
|
||||
bloomBlurShad <- makeSourcedShader "texture/bloomBlur" [vert, frag]
|
||||
lightingTextureShad <- makeSourcedShader "lighting/texture" [vert, frag]
|
||||
barrelShad <- makeShaderVBO "texture/barrel" [vert, geom, frag] (toFloatVAs [2, 2, 2, 1]) pmPoints
|
||||
|
||||
distbo <- mglCreate glCreateBuffers
|
||||
let distbosize = sizeOf (0 :: Float) * 6 * 1024
|
||||
glNamedBufferStorage distbo (fromIntegral distbosize) nullPtr GL_DYNAMIC_STORAGE_BIT
|
||||
glBindBufferBase GL_SHADER_STORAGE_BUFFER 9 distbo
|
||||
distptr <- mallocBytes distbosize
|
||||
let distvbo = VBO distbo distptr (sizeOf (0::Float) * 6)
|
||||
barrelShad <- makeSourcedShader "texture/barrel" [vert,frag]
|
||||
|
||||
putStrLn "Setup floor VBO, shader"
|
||||
flvbo <- mglCreate glCreateBuffers
|
||||
@@ -183,7 +190,7 @@ preloadRender = do
|
||||
, _alphaDivideShader = alphadivideshader
|
||||
, _lightingTextureShader = lightingTextureShad
|
||||
, _bloomBlurShader = bloomBlurShad
|
||||
, _barrelShader = barrelShad
|
||||
, _barrelShader = (barrelShad,distvbo)
|
||||
, _fbo2 = framebuf2
|
||||
, _fboHalf1 = fboHalf1Name
|
||||
, _fboHalf2 = fboHalf2Name
|
||||
|
||||
Reference in New Issue
Block a user