Yay, it works! So instead of just mixing with the previous frame, I'm mixing with a temporally reprojected previous frame, which eliminates the dizzy blurring due to camera movements and only preserves the "motion blur" of the cars.

#gamedev #indiedev

@lisyarus how do you do the reprojection?
@eniko I have this frame's depth buffer and camera matrix, which can be used to reconstruct world-space position of the pixel. Then, I use the previous frame's camera matrix to figure the screen-space position of this world-space point in the previous frame, and use it to sample the previous frame!

@lisyarus @eniko I always thought you need a motion buffer to do that.

But I guess if all that's moving is the camera, the camera matrices are enough.

You'll run into problems once you want to add other animations and effects on the map though...

@fell @eniko I'm OK with animated stuff being blurred, that's the whole point :) You won't get true motion blur, though, something like light trails at night aren't possible with this approach.

@[email protected] @eniko Light trails would be possible if you render the bright parts of the image into a separate buffer and blur that.

Basically a classic bloom, but blended with the previous frame instead of gaussian blur.

@fell @eniko But I'll still need motion vectors in this case?
@lisyarus I wanna see this for car light trails :D
@YinYinFalcon Unfortunately, this method doesn't work for light trails, for that you need true motion blur :(
@lisyarus wowww that's a clever effect, I'm impressed!