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)