1
\$\begingroup\$

Is there way to clear a scene with a transparency (alpha) value, in pure SFML?

I'm trying to clear with rgba(0,0,0,128) so the previous frame still partially shows through, which would create a motion blur effect.

I tried window->clear(Color(0,0,0,128)); but with no result

\$\endgroup\$
0
\$\begingroup\$

"Clearing the scene" will not produce this motion blur, you want to draw your frames into a RenderTexture, then draw this texture onto the main screen with your Alpha Blending enabled. Never clear the screen except on window resize.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.