Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inject previous buffer as a texture #25

Closed
gre opened this issue Oct 24, 2015 · 4 comments
Closed

inject previous buffer as a texture #25

gre opened this issue Oct 24, 2015 · 4 comments

Comments

@gre
Copy link
Owner

gre commented Oct 24, 2015

We need a way to inject the previous buffer as a texture. usecase: persistence effect (motion blur)

This is a solution to address gre/gl-react-native-v2#19

API

First idea: <GL.View ... uniforms={{ backbuffer: GL.DrawingBuffer }} />

Second idea (more generic): <GL.View saveBuffer="foo" ... uniforms={{ backbuffer: GL.fromBuffer("foo") }} />

@gre
Copy link
Owner Author

gre commented Oct 25, 2015

more generic way:

<GL.View saveBuffer="foo" ... uniforms={{ backbuffer: GL.fromBuffer("foo") }} />

@gre
Copy link
Owner Author

gre commented Oct 27, 2015

implementers will have to use special framebuffer that are preserved after each render. This new collection of framebuffers should be solved by the core impl. in gl-react-native impl, the fbos are shared, so that means we need a separated collection of fbos that belong to each view. We then need a new internal format to describe where the fbo belong (maybe we can have a fboType field that is either "shared" or "preserved")
we also need to introduce a new "texture type" that will pick from that collection.

Last point is how to handle the specific null framebuffer ? It sounds like we need a copy shader? Maybe we can generalize the idea of "post" shader that draws from a framebuffer to the output.

@gre gre changed the title GL.DrawingBuffer inject previous buffer as a texture Oct 27, 2015
@gre
Copy link
Owner Author

gre commented Dec 30, 2015

closing this dup in favor of #27

@gre gre closed this as completed Dec 30, 2015
@ptmt
Copy link

ptmt commented Dec 30, 2015

Awesome!
On Wed, 30 Dec 2015 at 20:03, Gaëtan Renaudeau notifications@github.com
wrote:

Closed #25 https://github.com/ProjectSeptemberInc/gl-react/issues/25.


Reply to this email directly or view it on GitHub
https://github.com/ProjectSeptemberInc/gl-react/issues/25#event-502916149
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants