Mesh wont appear after applied shader.
Posted: Wed May 13, 2009 6:07 am
for some reason, my mesh disappears when i apply my shader to it. it should at least show it, no? I don't get if it's the shader, or my code. any ideas on what it could be?
i've added my shader code here for you to see so MAYBE you could tell me what's wrong with it. Irrlicht doesn't give me any errors in the console so it's setting the shader right but for some reason, it doesn't show it.
has that ever happened to any one?
i've added my shader code here for you to see so MAYBE you could tell me what's wrong with it. Irrlicht doesn't give me any errors in the console so it's setting the shader right but for some reason, it doesn't show it.
Code: Select all
float4x4 matViewProjection : ViewProjection;
struct VS_INPUT
{
float4 Position : POSITION0;
float2 fTex : TEXCOORD0;
};
struct VS_OUTPUT
{
float4 Position : POSITION0;
float2 fTex : TEXCOORD0;
};
VS_OUTPUT Effect_Group_1_Effect1_Pass_0_Vertex_Shader_vs_main( VS_INPUT Input )
{
VS_OUTPUT Output;
Output.Position = mul( Input.Position, matViewProjection );
Output.fTex = Input.fTex;
return( Output );
}
texture my2DTexture_Tex
<
string ResourceName = "..\\Meshes\\Level_One\\crate.jpg";
>;
sampler2D Crate = sampler_state
{
Texture = (my2DTexture_Tex);
};
float4 Effect_Group_1_Effect1_Pass_0_Pixel_Shader_ps_main(in float2 fTex : TEXCOORD0) : COLOR0
{
return tex2D(Crate,fTex);
}