Hello,
I was wondering if any one could help me out I’ve just started working with shaders and HLSL and I’ve been tiring to get this simple example working but just can’t seem to figure out what I’m missing. I have every thing set up properly to load an .fx file and apply it to a model (tested the setup with a working shader) but every time I use this shader all I get is a light blue un-textured version of my model. I know I must be missing something painfully simple but I just can’t seem to figure it out. This is the HLSL code in the .fx file I’m using.
Code:
float4x4 matWorldViewProj;

struct VS_OUTPUT
{
float4 Pos: POSITION;
float2 Txr1: TEXCOORD0;
};

VS_OUTPUT mainVS(
float4 inPos: POSITION,
float2 Txr1: TEXCOORD0
)
{
VS_OUTPUT Out;

// Output our transformed and projected vertex
// position and texture coordinate
Out.Pos = mul(inPos,matWorldViewProj);
Out.Txr1 = Txr1;

return Out;
}

texture entSkin1;

sampler Texture0 = sampler_state
{
Texture = <entSkin1>;
};

float4 mainPS(float4 inDiffuse: COLOR0, float2 inTxr1: TEXCOORD0) : COLOR0
{
// Output the color taken from our texture
return tex2D(Texture0,inTxr1);
}

//--------------------------------------------------------------//
// Technique Section for MyEffectGroup
//--------------------------------------------------------------//
technique MyEffect
{
pass Pass_0
{
VertexShader = compile vs_1_1 mainVS();
PixelShader = compile ps_1_1 mainPS();
}

}



Any help would be greatly appreciated.

Cheers

Nagashi


No rest for the wicked.
__________________________

Ironbound Studios
__________________________