Page 1 of 1

Lua bindable depthbuffer

Posted: 29 May 2012, 14:44
by Beherith
I tried to bind the depthbuffer, but failed miserably. My opengl knowledge is just barely enough to toy with shaders :(

Would it be possible to have a bindable depthbuffer, maybe even a surface normals render target?

I would like the depthbuffer - if possible - to be bindable through Lua.

Having a depthbuffer+normals buffer (+ the existing framebuffer) would allow a heap of post processing tricks currently used by many games (LOS, deferred lighting, bloom, deferred AA).

Thank you devs!

Re: Lua bindable depthbuffer

Posted: 29 May 2012, 15:34
by jK
already possible: gl.CreateTexture()

Re: Lua bindable depthbuffer

Posted: 29 May 2012, 16:05
by Beherith
I meant so that I dont have to incur the performance penalty of
glCopyToTexture(depthTexture, 0, 0, 0, 0, vsx, vsy )