Fade Trails in Z direction

I’d like to draw fade trails in the Z direction. Is there a way to do this without creating a vector of shapes in the z direction? By using FBOs, for example?

You can create, for example, a mesh of type GL_LINES (https://openframeworks.cc/documentation/3d/ofMesh/), then update the z values of the vertices composing the mesh, so that their z values grows away from the camera until they get out of the far clipping plane, and then reset them behind the camera, so that you do not have to create new vertices.
Why you do not want to create “shapes”, and how to you want to use FBOs for this task?

I think you can do this by using the depth buffer + shader.
Render the trails in the deep buffer => you get a depth buffer texture.
with this values you can scale the color values of the trails from 1 to 0 in the shader…

Because I already have like 100 shapes on-screen and it’s very taxing for my system already. (I don’t know how to put them on GPU / shaders). So I thought I would use an FBO to draw “echos” or trails.

Good suggestion though to not create new vertices each time and just change their z

Hmm ok i will have to read up on how to do this (depth buffer, shader).

Hmm I’ve read up on this a little but am not much closer to having a solution I can implement.

I feel like I should be able to accomplish this by using fbos - taking a snapshot of the screen in an fbo, moving it in the z direction a little, then drawing the main screen + the fbo, then taking a snapshot of that, etc… I unfortunately can’t specify the z location of an fbo though - is there something i am missing?

I wonder if you have looked at the fboTrailsExample in the examples folder?

The FBO has no Z location as it’s not being looked at through a (virtual) camera. it’s the final 2D texture on the GPU storing a 2D image (after your whole rasterisation pipeline). So you draw your scene onto the FBO, move the scene forward, add that to the existing FBO, etc.