Original Post
I'm unsure of the exact terms, so I'll try to explain it. Let's say I have a float variable "f", in which I want to store the values of 2 floats.
f = 1567.0555;
float x,y;
int top = (int) f;
x = top / 1000.0;
y = (f - top) * 10.0; I want to do this so that I can send less data to the vertex shader for texture coordinates. It will cut the 16 floats I need to send down to 8. I have three questions if anyone has the time [smile] First, is this an ugly hack or what? Perhaps a better way to send the data? I don't think vertex shaders support 16 bit variables. Am I wrong? Second, does anyone know the maximum values of the numbers of each side of the decimal point? Both sides have the same range? Each side depends on how much data the other side uses? This is how floats work, right? The higher x is, the less precision y can use? Last, anyone know of a better way to pull the data apart inside the shader besides casting to an int? I'm using HLSL in DirectX 9c, so I'm not sure what is happening behind the scenes in asm. Guess this last one belongs in another forum. x = upper(f) / 1000; y = lower(f) * 10; Something magical such as that? Hehe [smile] I appreciate any suggestions or advice