- Fix packed normal order bug

This commit is contained in:
Magnus Norddahl 2017-04-14 04:14:20 +02:00
parent 2000784307
commit d2e0933a81

View file

@ -288,7 +288,8 @@ struct FModelVertex
int inx = clamp(int(nx * 512), -512, 511); int inx = clamp(int(nx * 512), -512, 511);
int iny = clamp(int(ny * 512), -512, 511); int iny = clamp(int(ny * 512), -512, 511);
int inz = clamp(int(nz * 512), -512, 511); int inz = clamp(int(nz * 512), -512, 511);
packedNormal = /*0x40000000 |*/ ((inx & 1023) << 20) | ((iny & 1023) << 10) | (inz & 1023); int inw = 0;
packedNormal = (inw << 30) | ((inz & 1023) << 20) | ((iny & 1023) << 10) | (inx & 1023);
} }
}; };