In your main function set this:
Code:
d3d_automaterial=1;



In your wad add your texture, ex.. stonemarble. Add your bump map texture to your wad file as this: stonemarble_n. Remember the alpha map of your normal map texture is used as the specular map.

Before your main function add this:

Code:
MATERIAL* stonemarble=
{
	specular_blue = 255;
	specular_green = 255;
	specular_red = 255;
	diffuse_red = 255;
	diffuse_blue = 255;
	diffuse_green = 255;
	specular_blue = 255;
	ambient_red = 0;
	ambient_blue = 0;
	ambient_green = 0;
	albedo = 200;
	power = 10;
	effect = "specBump.fx";
	flags = PASS_SOLID;
}



With d3d_automaterial, all your wed block textures will have the material with the same name applied to it. Make sure the wad file contains the normal map with the same name as the texture ending in _n.

edit:

Quote:
When I start the game, I get a warning saying "STONEMARBLE: Normal or height map missing".


Your normal map texture is a BMP. BMP files do not support alpha maps. The engine is probably looking for the specular map in the alpha channel and not finding it. TGA or DDS files can save with alpha channels.

One thing to keep in mind if your trying to use other shaders with wad textures is that the normal map textures ending in _n are placed in the entskin3 slot by the engine, not entskin2 like most shaders require.

Last edited by Stansmedia; 07/13/14 00:19.

Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en