shoreline
shoreline copied to clipboard
FR: transparency support
The framebuffer does not apply transparency correctly. It seems alpha values other than 0 are ignored?
See this comparison between shoreline (top) and pixelnuke (bottom) with similar inputs:
![]() |
![]() |
Thanks for this amazingly fast toy <3
Yes, there is no full transparency support. However, at the time of implementation that was a contious decision to keep performance as high as possible. I could implement full transparency support as an optional feature, that needs to be enabled/disabled at compile time though. Would that be fine with you?
Yeah, that sounds perfect! I just looked at the code, it'll be interesting to see the performance difference
Please have a look at https://github.com/TobleMiner/shoreline/tree/feature-alpha-blending
I'm not sure whether or not that is waht exactly you are looking for. Please let me know if it's ok or not.
I've just updated the branch again. Now transparent colors can also be composed ontop of one another
Thanks, that was quick!
Looks good so far. Just a minor thing: There is some flickering going on now on some pixels, when no data is coming in:
First thought was that this might be because of
-Ofast
/ -ffast-math
, but compiling without this option gives the same results.
If you think it's related to specific input data, I can test with other inputs.
edit: or is this #2?
Regarding performance: a standard build with SDL frontend peaks at 6.2 Gb/s on my laptop. With ALPHA_BLENDING it peaks at 5.4 Gb/s., so ~12% perf is lost.
Cool! The flickering is interesting. Right now I'm not entirely sure where it is coming from. Would you mind providing me with the picture you are using for testing? That could make replicating the issue a lot easier.
I'm pretty sure it is not #2, that should be strictly a performance thing. The issue you are seeing might also be related to the coalescing mechanism though.
to reproduce:
git clone https://github.com/speckij/hochwasser -b new-rgbsplit
cd hochwasser
go build .
wget https://nroo.de/pixelflut/pro_aktion.png
(sleep 0.2; echo 'rgbsplit' ) | ./hochwasser -image pro_aktion.png -order shuffle
Sorry for the delay. 5a0bcb966801c690d6f6852bc08f7f4bb9d1c3da should address the flickering you were seeing
Just came back to this; your last commit fixed the flickering :) Thanks