Cubemap + standard texture mix

i’m trying code a shader which mixes a standard texture (like constant) and a cube texture.

i took kalle’s cubetexture shader as a start.

adding an additional texture pin and standard view and projection is easy.

//cube map matrix stuff
float4x4 tWIT : WorldInverseTranspose;
float4x4 tWVP : WorldViewProjection;
float4x4 tW : World;
float4x4 tVI : ViewInverse;
//new
float4x4 tV: VIEW;
float4x4 tP: PROJECTION;

but now i’m stuck.

struct VS2PS
{
float4 HPosition : POSITION;
float3 WorldNormal : TEXCOORD0;
float3 WorldViewInv : TEXCOORD1;
float3 Proj: TEXCOORD2;
};

this passes only the inverse view right ?
how to add normal view ?

next…

in VS2PS is only cubetexture stuff being calculated…how to add a second projection ?

CubeTexture (PS Template).fx (5.4 kB)

see attttached…

i added a 2nd texture input and lots more.

//////////////////////////////////
putted everything additional between
//////////////////////////////////

the feature is only to be found in the last technique.

CubeTexture (U7).zip (4.8 kB)

cheers man, looks like i wasn’t on the wrong way.
i added something like

float4 TexCd : TEXCOORD3;

too, but it was giving me strange errors. mmm, can’t reproduce what i did wrong.

thanx kalle, helps a lot !