this post was submitted on 29 Aug 2023
210 points (97.3% liked)

Programmer Humor

19315 readers
312 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

Image of character from Team Fortress 2 saying "I fear no man" labelled Opengl Programmers "But that thing..." Tranparency "It scares me."

top 7 comments
sorted by: hot top controversial new old
[–] [email protected] 32 points 1 year ago (4 children)

You can use an O(n) radix sort on the Z-values because IEEE-754 floats share the integer property that leftmost bits always have higher values than rightward ones.

[–] [email protected] 23 points 1 year ago

Oh that just made it click in my head why they would do it as sign, exponent, mantissa and not sign, mantissa, exponent. I mean yes I've been taught it's for sorting purposes, but this really helped it fit better. Thanks!

[–] [email protected] 9 points 1 year ago

Thanks man, I'll look into it when I have the time. This should work on all IEEE compliant systems right?

[–] GlitchSir 1 points 1 year ago

His do I save a comment?

[–] themusicman 1 points 8 months ago
[–] [email protected] 14 points 1 year ago

I made a pact with myself in 2005 or so that I would never sort triangles by hand ever again. Since then I have been using higher level APIs and I have not regretted it.

[–] frobeniusnorm 6 points 1 year ago

All my homies use dual depth peeling