PROBLEM SOLVED i have to set everything in the right order:
….
video_switch(12,0,1);
d3d_autotransparency = 1;
camera.clip_near = 10; // 2 stop camera clipping to world at close range
doppler_factor = 2;
//NOW SHADOW VARS
shadow_stencil = 2;
shadow_lod = 1; // use the second LOD stage for stencil shadows
stencil_blur(1); // activate blurred shadows

level_load…..