Skip to content

Commit

Permalink
better context on why copy-frame may be necessary?
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed Mar 9, 2024
1 parent 2d8872c commit 8314a4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/shimmers/sketches/video_delay_shader.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
fc (q/frame-count)]
(when (and (q/loaded? shader) (> fc 1))
;; not clear why copy-frame is required but it is -- otherwise every frame is black
;; possibly because we need to copy the last frame to show before calculating the new buffer
(video/copy-frame buffer (nth frames (mod fc history)) w h)
(shader/pass shader [w h]
{"u_resolution" (array w h)
Expand Down

0 comments on commit 8314a4d

Please sign in to comment.