Source
- URL: https://x.com/tom_forsyth/status/1888487365091733759
- Author: Tom Forsyth (TODO: fix my heart or die) (@tom_forsyth)
- Posted: 2025-02-09 07:17:28
Branch
1/ @tom_forsyth
@iquilezles
This is so infuriating. It’s advice that is 20 years out of date (maybe 15 if you’re on mobile?) that was never that important to begin with, but has absolutely poisoned peoples’ minds.
2/ @iquilezles
@tom_forsyth
I think one reason it’s so sticky is that it has a bit of code obfuscation, some math, some hardware mythology… So you think you are obviously being very “smart” when you use it.
3/ @MarkJGx
@iquilezles @tom_forsyth
It’s super easy to get sucked into that kind of thinking because we all want to be clever. But sometimes the smartest move is the simplest one, just look at the disassembly.
4/ @MarkJGx
@iquilezles @tom_forsyth
Lower level optimization without even looking at the disassembly is the true cardinal sin.
5/ @tom_forsyth
@MarkJGx @iquilezles
Yeah, I’m totally fine with seeing some byzantine shader code along with a comment saying “sorry about the mess this is the only way I could get it to emit the right asm”. We’ve all been there… :-)