
It's also described in the manual for his assembly library. See page 22 of the VCL manual for more details.

If you want to see assembly code to do this his assembly library also does this for SSE2 (and maybe AVX2) It does this for you using SSE2 or AVX2 for 32-bit numbers (instead of the 15-bit numbers in the code above). Import into Blender all parts of the 0.nif body. The main steps to adapt an armour or outfit to another body for Skyrim are: Adapt the armour: Adapt the 0.nif armour mesh: Import into Blender the existing armour you want to modify. I use Agner Fog's Vector Class Library(VCL). Converting an armour to another body for Skyrim. There are several different methods to determine the magic number and n. The factor 2^n/M (aka magic number) should be calculated before the loop or at compile time.įor example if we want x/5 and we know that x is less than 2^15 we can use 2^n/M = 0xCCCD and n = 18.

If M is either a compile time constant or is constant within a loop then instead of using division you can calculated a reciprocal and then do multiplication and a shift.
