Issue
You have an array of texture coordinates and indexing into the array causes the following compiler error:
Error Error: error X8000: D3D10 Internal Compiler Error: Invalid Bytecode: Masks (and if pixel shader, also interpolation mode) on all input registers in an index range must be identical. Input register [1] does not match with others in the index range from 0 to 4.
float2 uvs[4] = { IN.UV0, IN.UV1, IN.UV2, IN.UV3 };
OUT.UVA = uvs[uvIndexA];
OUT.UVB = uvs[uvIndexB];
OUT.UVBlend = uvs[uvIndexBlend];
OUT.UVLightmap = uvs[uvIndexLightmap];
One possible solution
Assign the input texture coordinate variables to local variables first.
float2 a = IN.UV0;
float2 b = IN.UV1;
float2 c = IN.UV2;
float2 d = IN.UV3;
float2 uvs[4] = { a, b, c, d };
OUT.UVA = uvs[uvIndexA];
OUT.UVB = uvs[uvIndexB];
OUT.UVBlend = uvs[uvIndexBlend];
OUT.UVLightmap = uvs[uvIndexLightmap];