Post B6mSoBBoKHOq3V1Hwe by Ronflaix@mastodon.gamedev.place
 (DIR) More posts by Ronflaix@mastodon.gamedev.place
 (DIR) Post #B6mSoAAM8CdqshKc2S by Ronflaix@mastodon.gamedev.place
       0 likes, 0 repeats
       
       Bone weights on vertices should be normalized most of the time, if not all the time, right?
       
 (DIR) Post #B6mSoAOXHTz5afxw8m by Ronflaix@mastodon.gamedev.place
       0 likes, 0 repeats
       
       I'm thinking about packing 4 bones and 3 weights in a float4: .x is an u32 with the bone IDs packed and .yzw would be the weights for bone 1-3. You'd derive bone 0's weight by solving a Pythagorean equation.That, if the weights are effectively a normalized vector of 1 to 4 components.
       
 (DIR) Post #B6mSoAaaYfcqC3bYvY by neon@fedi.neon.moe
       0 likes, 0 repeats
       
       @Ronflaix Do weights need that much precision? I had pretty simple animations the last time I was testing it, so I might've been a bit too fast and loose with the packing, but my last renderer used rgba8 for both indices and weights to at least mild success (= it seemed to work).
       
 (DIR) Post #B6mSoBBoKHOq3V1Hwe by Ronflaix@mastodon.gamedev.place
       0 likes, 0 repeats
       
       I'm hesitating between using 0xFF and 0xFF as index for an invalid bone. 0xff is the classic case but 0x00 could allow me to still evaluate and mask the calculation easily given that it's going to almost exclusively be the root bone, if that would improve vectorization
       
 (DIR) Post #B6mThqtkxI4lL97c3s by Ronflaix@mastodon.gamedev.place
       1 likes, 0 repeats
       
       @neon I haven't really given a shot at skinning yet, I'm planning theorically but that's a good point. I could try this too, thanks for the idea.