Tom Forsyth on Nostr: npub1p6plc…nvv94 npub1vu0za…x00z0 In the early versions of shader languages, you ...
npub1p6plcctn2d2fwtdfhpp8kgezjfpfklvz2nkknkw94gwvam64q4pqknvv94 (npub1p6p…vv94) npub1vu0zay8wzdnt05dyj0n3w24fq89e84gzq3ft53jcvrf74tea466swx00z0 (npub1vu0…00z0) In the early versions of shader languages, you do the swizzle in two steps:
1. Pad to a 4-tuple by repeating the last letter.
2. Apply the destination "swizzle" as a write mask.
So step #1 does "r.xy" -> "r.xyyy".
Then step #2 writes the Y and Z channels of that.
You see the problem? Yeah. Bug farm.
1. Pad to a 4-tuple by repeating the last letter.
2. Apply the destination "swizzle" as a write mask.
So step #1 does "r.xy" -> "r.xyyy".
Then step #2 writes the Y and Z channels of that.
You see the problem? Yeah. Bug farm.