Originally Posted By: 3run
I'll try to do some tests on my side.
The easiest way to handle this without shader stuff, is to reset the material to 'mtl_model' and then change colors, just as I've thought. And it's working, probably you've made some kind of a mistake on your side.

Here is a working script (you'll need 'box.mdl' from 'shadertest' project in Acknex's root folder):
Code:
#include <acknex.h>
#include <default.c>

#include <mtlFX.c>

void main(){
	level_load("");
	wait(3);
	sun_light = 100;

	vec_set(camera.x, vector(117, 224, 74));
	vec_set(camera.pan, vector(240, -18, 0));

	ENTITY* ent = ent_create("box.mdl", nullvector, NULL);
	ent.material = mtl_specBump;

	while(1){
		sun_angle.pan += 5 * time_step;
		sun_angle.tilt += 5 * time_step;
		draw_text("press space to turn into devil cube!", 10, 10, COLOR_WHITE);
		if(key_space){break;}

		wait(1);
	}

	ent.material = mtl_model;
	set(ent, LIGHT | UNLIT); // UNLIT here is to make it's color more visible
	vec_set(ent.blue, COLOR_RED);

	while(!key_enter){
		draw_text("press enter to turn into normal cube!", 10, 10, COLOR_WHITE);
		wait(1);
	}
	reset(ent, LIGHT | UNLIT);
	vec_set(ent.blue, COLOR_GREY);
	ent.material = mtl_specBump;


	while(1){
		sun_angle.pan += 5 * time_step;
		sun_angle.tilt += 5 * time_step;

		wait(1);
	}
}

You maybe could play with 'emissive' colours of the shader, but that will make all other entities with that material red.

Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung