We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Add another texture output that is a copy of the last frame to a glsl shader.
(from /src/opengl.c, line 587)
// Get uniform addresses #define P_GET_UNIFM_LOC(name, target) { pprogram->target = glGetUniformLocation(pprogram->prog, name); if (pprogram->target < 0) { log_error("Failed to get location of uniform '" name "'. Might be troublesome."); } } P_GET_UNIFM_LOC("opacity", unifm_opacity); P_GET_UNIFM_LOC("invert_color", unifm_invert_color); P_GET_UNIFM_LOC("tex", unifm_tex); ++ P_GET_UNIFM_LOC("prevtex", unifm_prevtex); ++ P_GET_UNIFM_LOC("time", unifm_time); #undef P_GET_UNIFM_LOC
So that the frag shader can see the difference from previous frame (for fading,blending,blurring,etc.)
The process i am thinking of is
--frame 0--
current texture(frame0) -> shader previous texture(null) to shader --shader renders frame to fragcolor-- current texture(frame0) -> previous texture
--frame 1--
current texture(frame1) -> shader previous texture(frame0) -> shader --shader renders frame to fragcolor-- current texture(frame1) -> previous texture
etc.
I'm thinking that a framebuffer would have to be used as well.
Perhaps add a cmdline switch to only enable when needed.
If this isn't the right way to go about this, please lmk. Thank you. j
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Add another texture output that is a copy of the last frame to a glsl shader.
(from /src/opengl.c, line 587)
So that the frag shader can see the difference from previous frame (for fading,blending,blurring,etc.)
The process i am thinking of is
--frame 0--
current texture(frame0) -> shader
previous texture(null) to shader
--shader renders frame to fragcolor--
current texture(frame0) -> previous texture
--frame 1--
current texture(frame1) -> shader
previous texture(frame0) -> shader
--shader renders frame to fragcolor--
current texture(frame1) -> previous texture
etc.
I'm thinking that a framebuffer would have to be used as well.
Perhaps add a cmdline switch to only enable when needed.
If this isn't the right way to go about this, please lmk.
Thank you. j
The text was updated successfully, but these errors were encountered: