Im trying to get
Matt's normalmapping shader to work.
I just changed normaldemo.c from the
shader workshop by using a "test.fx" file (code from wiki) for the effect property. That, however, doesnt work. Any ideas?
Code:
////////////////////////////////////////////////////////
// Copyright 2006 by Taco Cohen. All rights reserved
// 2007 adapted to A7 / lite-C by jcl
////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
MATERIAL* mtlNormal =
{
ambient_red = 40; // The ambient color - a dark grey.
ambient_green = 40;
ambient_blue = 40;
effect = "test.fx"; // The effect file containing the vertex shader, pixel shader and technique.
// flags = AUTORELOAD; // allows to edit the shader at runtime
}
function main()
{
// Load an empty level, and create a model :
level_load("");
wait(2);
ENTITY* ent = ent_create("blob.mdl",vector(50,0,0),NULL);
ent.material = mtlNormal;
while(1)
{
sun_angle.pan += 1.25 * time_step;
ent.pan -= 2.25 * time_step;
ent.tilt -= 1.1 * time_step;
wait(1);
}
}