Vertex pull fullscreen lighting texture shader
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user