mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
motion blur
This commit is contained in:
@@ -22,6 +22,11 @@ gl::postfx::postfx(const shader &s)
|
||||
}
|
||||
|
||||
void gl::postfx::apply(opengl_texture &src, framebuffer *dst)
|
||||
{
|
||||
apply({&src}, dst);
|
||||
}
|
||||
|
||||
void gl::postfx::apply(std::vector<opengl_texture *> src, framebuffer *dst)
|
||||
{
|
||||
if (dst)
|
||||
{
|
||||
@@ -33,8 +38,12 @@ void gl::postfx::apply(opengl_texture &src, framebuffer *dst)
|
||||
|
||||
program.bind();
|
||||
vao->bind();
|
||||
src.bind(0);
|
||||
|
||||
size_t unit = 0;
|
||||
for (opengl_texture *tex : src)
|
||||
tex->bind(unit++);
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDepthMask(GL_FALSE);
|
||||
glDepthMask(GL_FALSE);
|
||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user