Add barrel distortion shader

This commit is contained in:
jgk
2021-07-09 14:36:49 +02:00
parent 5301b6d0bd
commit fd388e1fdf
12 changed files with 192 additions and 8 deletions
+5 -1
View File
@@ -144,8 +144,12 @@ doDrawing pdata w = do
depthFunc $= Just Always
bindFramebuffer Framebuffer $= defaultFramebufferObject
clear [ColorBuffer]
activeTexture $= TextureUnit 1
textureBinding Texture2D $= Just (snd $ _fboBase pdata)
drawShader (_fullscreenShader pdata) 4
nraddist <- F.foldM (pokeShader $ _barrelShader pdata) (map Render2221 $ _radDistortion w)
bindShaderBuffers [_barrelShader pdata] [nraddist]
drawShader (_barrelShader pdata) 4
activeTexture $= TextureUnit 0
-- draw overlay
bufferUBO $ isoMatrix 0 1 (0,0) (2,2)