Vftdan Channel
25 subscribers
110 photos
2 videos
9 files
178 links
author: @vft_dan
Download Telegram
Forwarded from ⚠️Invalid Handle (owo)
⚙️ 🔁 Vftdan
There are 2 ways to treat your Thinkpad:

cc
@hatkidchan @dettlaff
👍2
🥰1🤯1🥴1
1. Google for an InterTurkic conlang
2. Follow the link to http://ib.frath.net/w/InterTurkic
3. From it, follow the link to Turkestan
4. ???
5. Start loosing your mind
Vftdan Channel
Apparently, images can store their pixels' rgb values premultiplied by their alpha value, so drawing them over backgrounds takes 1 less operation https://www.youtube.com/watch?v=XobSAXZaKJ8 #links #video #youtube
Actually, I think I have never read about the proper way of overlaying several colors.

But when I was in the middle school and was writing JavaScript on an iPhone, I think I read about getImageData and setImageData on habr.com and so tried working with it myself. I either invented or read somewhere (possibly in that article) about lerp function and somehow invented myself a way of overlaying 2 rgba colors. The formula for the resulting alpha was a monstrosity of a redundant number of lerps.

Later, in the high school, I found that code, simplified the formula and used it again for working with ImageData.

So, I'm interested how correct my formula is. I'll translate (hopefully, correctly) it to GLSL, so it's (probably) easier to read, apparently lerp is named mix there:

float aa = (1.0 - fg.a) * bg.a;
gl_Color.rgb = mix(fg.rgb, bg.rgb, aa);
gl_Color.a = aa + fg.a;


I. e. resulting alpha = lerp(bg.alpha, 1, fg.alpha). It makes sense indeed: if fg.alpha = 0, then the background color doesn't change, so alpha is bg.alpha; if fg.alpha = 100%, then the foreground color is the result, so alpha is 100%.

So according to this code, you actually need (1 - bg.a * (1 - fg.a)) instead of fg.a to be multiplied by fg.rgb, so premultiplication is only useful for fully opaque backgrounds.

#original
🥴2
Cascading jaywalking consensus protocol
👏1
Humans are big neurons. Except they transceive memes instead of simple spikes.
Deterministic subsystem that infers morality and makes decisions based on it should assume it has free will.
Forwarded from ⚠️Invalid Handle (🥴)
🥴 .ass moment
😁2
Do I understand correctly, that the "co-" prefix in #algebra can have two very different meanings:
1. complementary, opposite
2. covariant, preserving, non-inverting
?

#math #maths #language #linguistics
Roman numerals is a (3positive,1negative 5)*2-nary partially positional numeral system

Roman numerals modification that uses IIV instead of III is a (balanced 5)*2-nary partially positional numeral system

#math #maths #original(?)
🤔1
Petition for GitHub to add it as a reaction for issues (specifically, feature requests):