I'm trying to get my normalmapping shader with blinn-phong specular to work on ps 1.1. I have to normalize the halfangle vector in the pixel shader but because I can't afford another normalize() (max 10 instructions..), I think I'll have to use cubemap normalization.

What I have is this:
Code:

c-script:
bmap NormalizeCubeMap = "normalize.dds";
..
material abc
{
skin1 = NormalizeCubeMap;
..
}
..
bmap_to_cubemap(abc.skin1);

hlsl:
texture mtlSkin1;
samplerCUBE NormalizationCubeMapSampler = sampler_state
{
Texture = <mtlSkin1>;
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Linear;
AddressU = Clamp;
AddressV = Clamp;
};

pixel shader:
InHalf = 2 * texCUBE(NormalizationCubeMapSampler,2 * InHalf - 1) - 1;


Explanation:
I first define a bitmap that contains the normalized vectors. The sides are in the following order: x, -x, y, -y, z, -z (I found this image on the web). Then I assign that bitmap as the first material skin. Then I use bmap_to_cubemap to convert the bitmap to a cubemap, I'm not sure this is needed so I also tried without that instruction and it doesn't work either. I then set up the texture and sampler in hlsl. In the pixelshader I try to normalize the vector InHalf. InHalf has been shifted to the range [0..1] so I have to shift it back to [-1..1] by 2 * InHalf - 1. Then I use that as the 3d coordinate to lookup in the cubemap. I then shift the resulting vector from [0..1] to [-1..1].

The results are wrong. It's not just inacurate it just gives incorrect results. I'm pretty sure the normalize.dds is correct (atleast it contains normalized vectors, I checked that) but I'm not too sure about the order of the sides.. Can anyone spot the mistake here?

btw, my shader works fine when I use normalize() and ps_2_0 as compile target.