> However, using a transparent color significantly slowed down the number that can be drawn too which doesn't make as much sense to me. I'd imagine that with hardware today transparency should be somewhat free. That's because transparency limits how you can batch draws on the GPU. With opaque draws, you can use the depth buffer and draw in any order you like e.g. maximizing batching. With transparency, you need to dr…
Can't you mathematically work out how to change the colors/opacity to rearrange the job?
So you think you know box shadows?
41–50 of 130 posts
Re: So you think you know box shadows?
#42I'm totally down for some good old fashioned impractical hacking. But just remember, we already have canvas, which can do all this easier, faster, and better.
Re: So you think you know box shadows?
#43He said it might melt your processor... but on a macbook m3 in arc runs great, like every one of those was amazing.
Re: So you think you know box shadows?
#44Seriously fun exploration. > Layering. That is an important word. Layering is also the key to the (silly but also sometimes good-looking) effects from my text shadow project from 14yrs ago: https://paulirish.github.io/mothereffingtextshadow/
Re: So you think you know box shadows?
#45I'm embarrassed to admit it took until the final paragraph before realising that 'gypity' is a reference to Chat GPT.
Re: So you think you know box shadows?
#46> It also turns out that some smart people figured out maths hacks to draw rounded boxes for super cheap which UI peeps love because with this hack boxes can be so round as to appear as circles Any references to learn more about these hacks?
Some historic articles on software rendering (the original Bill Atkinson stuff) https://www.folklore.org/Round_Rects_Are_Everywhere.html http://wg20.criticalcodestudies.com/index.php?p=/discussion/... A modern 3D accelerated article (using SDF as another commenter suspected) https://mortoray.com/quickly-drawing-a-rounded-rectangle-wit...
Have to add work by Evan Wallace here too as he is a legend.
https://madebyevan.com/shaders/fast-rounded-rectangle-shadow... https://madebyevan.com/webgl-path-tracing/
Re: So you think you know box shadows?
#47Re: So you think you know box shadows?
#48Re: So you think you know box shadows?
#49Re: So you think you know box shadows?
#50Earlier quoted context omitted.
Can't you mathematically work out how to change the colors/opacity to rearrange the job?
Having that knowledge sounds just as expensive if the operations aren't commutative.