Hi,

Just started to learn HLSL... I tried this code on the cbabe.mdl, but nothing happens...
Why?

my_shader1.fx
Code:
float4x4 matWorldViewProj;
struct VS_OUTPUT
{
float4 Pos : POSITION;
};
VS_OUTPUT vs_main(float4 inPos: POSITION)
{
VS_OUTPUT Out = (VS_OUTPUT) 0;
Out.Pos = mul(inPos,matWorldViewProj);
return(Out);
}
float4 ps_main() : COLOR
{
float4 Col = float4(1,1,0,1);
return(Col);
}
technique tech1
{
pass pass0
{
VertexShader = compile vs_2_0 vs_main();
PixelShader = compile ps_2_0 ps_main();
}
}



Level c-script code
Code:
// level.wdl
var video_mode = 7;
var video_depth = 32;
var video_screen = 2;

function main()
{
freeze_mode = 1;

level_load("level.wmb");

wait(3);

freeze_mode = 0;

while(1)
{
camera.pan -= mouse_force.x * 15 * time;
camera.tilt += mouse_force.y * 15 * time;
camera.tilt = clamp(camera.tilt,-80,80);
wait(1);
}
}

material my_shader1
{
effect = "my_shader1.fx";
}

action shader_ent1
{
my.material = my_shader1;
}