Vertex pull fullscreen lighting texture shader

This commit is contained in:
2025-11-13 10:28:34 +00:00
parent b012d3c41e
commit 8dee93991a
6 changed files with 28 additions and 21 deletions
+16
View File
@@ -44,6 +44,12 @@ preloadRender = do
glNamedBufferStorage lightubo 32 nullPtr GL_DYNAMIC_STORAGE_BIT
glBindBufferBase GL_UNIFORM_BUFFER 1 lightubo
fulltexbo <- mglCreate glCreateBuffers
let ftsize = fromIntegral $ sizeOf (0::Float) * 6 * 4
withArray cornerList' $ \ptr ->
glNamedBufferStorage fulltexbo ftsize ptr 0
glBindBufferBase GL_UNIFORM_BUFFER 2 fulltexbo
winssbo <- mglCreate glCreateBuffers
let winssbosize = sizeOf (0 :: Float) * 8 * 1024
glNamedBufferStorage winssbo (fromIntegral winssbosize) nullPtr GL_DYNAMIC_STORAGE_BIT
@@ -248,6 +254,16 @@ cornerList =
, [1, 1, 1, 1]
, [1, -1, 1, 0]
]
cornerList' :: [Float]
cornerList' = concat
[ bl, br, tl
, tl, br, tr
]
where
bl = [-1, -1, 0, 0]
br = [ 1, -1, 1, 0]
tl = [-1, 1, 0, 1]
tr = [ 1, 1, 1, 1]
--cornerListForTriangles :: [[Float]]
--cornerListForTriangles =