Quantcast
Viewing all articles
Browse latest Browse all 40524

FboTrailing example with transparent background

Hi,

Not entirely sure how it's all supposed to blend together in the end, but if I wanted fading trails on top of a video and the trails can be one colour I would:

Setup:
- Allocate an FBO
- Clear it to black

Draw:
- Bind this FBO
- Draw semitransparent black rect, (this gives you the fade)
- Draw your particle in white
- Unbind

  • Draw the video
  • Use additive blend (and colorize it with whatever colour you have set with ofSetColor) or a shader to blend the trails FBO on top.

There'll be a way to do it with alpha as well, but the caffeine hasn't really hit yet so it's escaping me.


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>