#include <default.c>
FONT* A24bi = "Arial#24bi";
var vAniso = 8.0;
MATERIAL* mtl_anisotropic =
{
effect = "
bool AUTORELOAD;
float vAniso_var;
texture entSkin1;
sampler sAnisotropic = sampler_state {
Texture = <entSkin1>;
MipFilter = Linear;
MinFilter = Anisotropic;
MagFilter = Linear;
MaxAnisotropy = vAniso_var;
AddressU = Wrap;
Addressv = Wrap;
};
technique anisotropic {
pass one {
sampler[0] = (sAnisotropic);
}
}";
}
VIEW* camera1 = {size_x = 400; size_y = 800; flags = SHOW;}
VIEW* camera2 = {pos_x = 400; size_x = 400; size_y = 800; flags = SHOW;}
function main()
{
vec_set(sky_color,COLOR_BLACK);
video_window(NULL,NULL,2,NULL);
video_set(800, 800, 32, 2);
//if (d3d_caps & 2) { d3d_mipmapping = 4; d3d_anisotropy = 16; printf("d3d_anisotropy active");}
mouse_mode = 4;
mip_levels = 10;
d3d_anisotropy = 7;
d3d_mipmapping = 4;
level_load("mips_aniso.wmb");
camera.flags &= ~SHOW;
vec_set(camera1.x,vector(0,0,150));
vec_set(camera1.pan,vector(0,-30,0));
vec_set(camera2.x,vector(15000,0,-350));
vec_set(camera2.pan,vector(0,-30,0));
PANEL* pAniso = pan_create(NULL,0);
pan_setdigits(pAniso,0,10,60,"Anisotropy Level = %.f", A24bi, 1, vAniso);
pan_setstring(pAniso,0,300, 0,A24bi,str_create("mip_levels = 10;"));
pan_setstring(pAniso,0, 10, 90,A24bi,str_create("Anisotropy Enabled"));
pan_setstring(pAniso,0,500, 60,A24bi,str_create("d3d_mipmapping = 4;"));
pan_setstring(pAniso,0,500, 90,A24bi,str_create("d3d_anisotropy = 7;"));
pan_setstring(pAniso,0,500,120,A24bi,str_create("Anisotropy Disabled"));
pan_setslider(pAniso,0,250,60,bmap_fill(bmap_createblack(100,1,32),COLOR_GREY,100),bmap_fill(bmap_createblack(12,32,32),COLOR_RED,100),0,16,vAniso);
set(pAniso, SHOW);
vec_fill(mtl_anisotropic.ambient_blue, 20);
/*while(1)
{
camera1.pan += .1*time_step;
camera2.pan -= .1*time_step;
wait(1);
}*/
}