This might be a bit hard-to-answer question, but... I had a DirectX::XMFLOAT3 as a vertex attribute. I have changed it to just an int by placing the 3 floats into int (using only 8 bits per float). In the vertex shader I am extracting the bits like this:
// example int bits: 00000000 10011000 00011101 11111111 input.weight.x = ( input.w >> 16 ) / 255.0f; // 10011000 / 255.0f input.weight.y = ( ( input.w & 0x0000FF00 ) >> 8 ) / 255.0f; // 00011101 / 255.0f input.weight.z = ( input.w & 0x000000FF ) / 255.0f; // 11111111 / 255.0f
But with this manner I've only gained like 1-5 fps (from ~130 to ~135), how is that possible that the fps boost is that small? What's the culprit here? Is the extracting bits on GPU that heavy?