Hello!
Downloaded RenderMonkey to try out some shader coding. I am trying to simply texture a mesh but can't get it to work. I guess you experienced guys can see the error pretty quick.
The result I got now is that the mesh got the same color over it. Probably the first pixel color in the image file.
Thanks for your help!
/Klarre
Vertex shader
float4x4 matViewProjection;
struct Vertex
{
float4 position : POSITION;
float2 texCoord : TEXCOORD;
};
Vertex vs_main(Vertex IN)
{
Vertex OUT;
OUT.position = mul(IN.position, matViewProjection);
OUT.texCoord = IN.texCoord;
return OUT;
}
Pixel shader
sampler2D tex0;
float4 ps_main(float2 texCoord : TEXCOORD) : COLOR
{
return tex2D(tex0, texCoord);
}
[Edited by - Klarre on February 9, 2008 12:19:58 PM]