Fading trails - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Prolific Programmers (https://qb64phoenix.com/forum/forumdisplay.php?fid=26) +---- Forum: SMcNeill (https://qb64phoenix.com/forum/forumdisplay.php?fid=29) +---- Thread: Fading trails (/showthread.php?tid=3336) |
Fading trails - SMcNeill - 01-01-2025 For @bplus Code: (Select All)
A demo of how to keep a background from being altered, while fading out a trail behind an image. Nothing fancy here; just a simple red box that chases after your mouse and leaves a nice trail behind itself as it does so, without fading or altering the background image any whatsoever. RE: Fading trails - Pete - 01-01-2025 Sandworms! I hates 'em! - Sam RE: Fading trails - bplus - 01-01-2025 +1 Oh man! great Steve, thanks! Cool and cute and brief, I will study, I see you are using Mem's. RE: Fading trails - SMcNeill - 01-01-2025 (01-01-2025, 06:20 AM)bplus Wrote: +1 Oh man! great Steve, thanks! You *may* be able to do the same with PSET, but you'd probably need to _DONTBLEND first. PSET tends to do blending automatically, so if you go to PSET (x.y), _RGBA32(0,0,0,0), it doesn't do much of anything at all. The goal isn't to get down to BLACK (which is RGBA(0,0,0,255)), but to get down to TRANSPARENT (RGBA(0,0,0,0)), and you certainly can't do that with _BLEND enabled. I just chose to use _MEM as this is an inner loop type process and something which we're calling over and over repeatedly, so it's one of those spots where you want to minimize impact on how long it takes to run, as much as possible. RE: Fading trails - bplus - 01-01-2025 +1 thanks again! that is definitely interesting demo though I've yet time to really study it. Yeah I do want to get into using mem stuff for that time savings. Pset tip is tempting for firework we were working yesterday. |