Oluseyi Sonaiya Profile picture
Jul 11, 2020 6 tweets 3 min read Read on X
Need help. #iOS #metal

I collect a series of points into array-like objects called Strokes. I copy the points to the GPU and generate (2 * n) + 2 vertices. I call drawPrimitives with the triangleStrip type.

It connects my strips with these degenerate tris. Lost. Help, thx? ImageImage
Good catch, @0x21376B00: I was reducing the vertexCount on the drawPrimitives call as a crude debugging test, to see if the artifacts were introduced by erroneous point/vertex generation, and that's in the snippet pasted here.

Sadly (thankfully?), that's not it.
Vertex generation shader: Image
OH.

OHHHHHH.

Line 73 in the shader assumes that each primitive is drawn starting at vertex ID 0, but that is only true for the *first* stroke. Each subsequent stroke starts at `vertexCount` (before updating that value). 🤦🏾‍♂️
So this was good to clean up, but the "fix" was to draw 2*n vertices instead of 2*n + 2. I don't understand why; have I misunderstood triangle strips for all these years, or is #metal just buggy and nobody really uses tri strips so nobody cares?
Either way, the prototype is advancing. Some really good perf numbers so far. Need to add more complexity to the fragment shading, and then migrate vertex generation to a compute kernel.

An inscrutable picture for anyone who slogged through this 😂 Image

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Oluseyi Sonaiya

Oluseyi Sonaiya Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @OluseyiSonaiya

Sep 26, 2020
Good thread. Always reminds me to check on progress with RISUG—en.wikipedia.org/wiki/Reversibl…—and Vasalgel.

RISUG has been under development for 41 years, has completed Phase III human trials with zero side effects and 97.3% success rate, but is a poor value proposition for Big Pharma.
RISUG is a reversible indefinite male contraception, where a polymer is injected into the vas deferens in an outpatient procedure that is cheap (the polymer costs less than the syringe) and quick.
Imagine a world where a boy is given RISUG at puberty, and can remove it in adulthood when ready to become a father. That would be an end to unplanned juvenile pregnancy, remove the contraception burden from women, and virtually eliminate abortions. Everyone should support this.
Read 14 tweets
Sep 22, 2020
Lemme guess, he then announced a K-12 initiative to help disadvantaged black youth? This is a gamble so classic we refer to it as "The Pipeline Problem."

The unspoken part is that these orgs narrow their search lens in advance. If you only look in the Ivies, then yeah, limited.
They narrow their search lenses to exactly what their leadership's and executives' qualifications are, then are "surprised" that the non-representative elite schools they recruit from don't have large pools of diverse talent.
Plenty of talent can do the job, they just don't want to do the work of finding or developing it. This allows them to outsource bias to higher education, and then make grandiose gestures about investing in "pipeline" for future candidates 20 years out.

🙄
Read 5 tweets
Sep 15, 2020
I pay $14.99 for Music Family, $9.99 for 2TB iCloud storage, and $4.99 for Arcade which my son remembers to use once a quarter.

If One Family had 2TB storage, I'd be saving $9.98 a month. As it is I'd need to spring for Premier, and save… 2¢.

🤷🏾‍♂️
Wash for me, even though I don't care about TV+, News+, or Fitness+. Still, nice to just have one billing event instead of three.
Read 4 tweets
Aug 1, 2020
Started watching #WarForCybertron, and the Cybertronians have flags made of fabric—one character is even wearing a cloak.

…why?

Their bodies are metal. They are impervious to the atmosphere of most planets.
In one scene, the Cybertronians were walking and one character ran to catch up—and was panting.

Since when do Cybertronians have *lungs*? What is he breathing on Cybertron?

And why were they walking, anyway, since they have vehicle forms that travel faster?
Sometimes I see aesthetics transposed from human experience onto fictional contexts without consideration of its implications, and it snaps me out of deep enjoyment. I get it, "it's a show for kids," but kids deserve better.
Read 6 tweets
Jul 29, 2020
teenyicons.com by @rebellenoire is pretty awesome
STORY TIME!

I used to work on a mobile app by a major US sporting league. Sports leagues have lots of teams, and those teams have bunches of logos—primaries, alternates, simplified, etc. With bitmap icons and several different sizes, that adds up.
I wanted us to switch to SVG, not only so they'd compress much better, but so we could add pathing effects—imagine the ring of stars on a team's logo rotating, when you're looking at the scoreboard.
Read 4 tweets
Jul 15, 2020
I don’t talk about where I work. I don’t add my former employers to my bio, a practice super common in tech for the purpose of lending weight to your opinions—“Oh, she’s ex-Google; she must be smart!” Someone once described this as quitting the company but not the brand.
I think it’s interesting in light of this current debate about speech, platforms, and cancelation, but also the much longer trend of firms demanding access to your social media before hiring you. The root cause is the same: corporatism.
In the US in particular (but pretty much everywhere in the world), we filter so much of our perceived value, worth, prestige, etc through corporations. We center them in our lives and assign importance to our relative distances from power within them.

It’s gross and inhuman.
Read 6 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(