Work on distortions

This commit is contained in:
2025-11-18 10:55:46 +00:00
parent 1205823ddb
commit 8428f08ebd
6 changed files with 86 additions and 47 deletions
+5 -4
View File
@@ -366,12 +366,13 @@ doDrawing' win pdata u = do
glBindFramebuffer GL_FRAMEBUFFER 0
glUseProgram (pdata ^. fullscreenShader)
glDrawArrays GL_TRIANGLES 0 6
(RadialDistortion (V2 a b) (V2 c d) (V2 e f) (V2 g h) _:_) -> do
--(RadialDistortion (V2 a b) (V2 c d) (V2 e f) (V2 g h) _:_) -> do
(RadialDistortion a b c d e f _:_) -> do
glBindFramebuffer GL_FRAMEBUFFER (pdata ^. fbo2 . _1 . unFBO)
pokeArray (pdata ^. barrelShader . _2 . vboPtr) [a, b, c, d, e, f, g, h]
withArray [a, b, c, d, e, f, g] $
-- pokeArray (pdata ^. barrelShader . _2 . vboPtr) [a, b, c, d, e, f, g, h]
withArray [a, b, c, d, e, f] $
glNamedBufferSubData (pdata ^. barrelShader . _2 . vboName) 0
(6 * fromIntegral (sizeOf (0 :: Float)))
(12 * fromIntegral (sizeOf (0 :: Float)))
glBindTextureUnit 1 $ pdata ^. fboBase . _2 . _1 . unTO
glUseProgram (pdata ^. barrelShader . _1)
glDrawArrays GL_TRIANGLES 0 6