Hello,

I have realized that the main problem with shaders in my level seems to be the lowered blending of shadowmap. When shader is applied the model's shadowmap gets bleached out.

The best solution I've got is based on shadowmap replacement that depends on shaders being active or inactive. If shaders are OFF, the model uses the default shadowmap & if shaders are ON, the model uses modified shadowmap (higher saturation & lower lightness).

The problem is that we will have about 100 levels with, let's say, at least 300 shadowmaps. That's one BIG function grin It would be great if the shadomap assignment could be, somehow, automated.

This is my primitive code solution:

Click to reveal..
BMAP* C3_L1_A = "C3_L1_A.dds";
BMAP* C3_L1_A_2 = "C3_L1_A_2.dds"; //Replacement texture

action NM_Shadowmap()
{
while(1)
{
if((shaders_on==1)&&(my.skill3==0))
{
my.skill3=1;
ent_setskin(me,C3_L1_A_2,2);
wait(1);
if(my.skill1==1){my.material = NM_C3_Metal;}
if(my.skill1==2){my.material = NM_C3_Floor;}
}
if((shaders_on==0)&&(my.skill3==1))
{
my.skill3=0;
ent_setskin(me,C3_L1_A,2);
wait(1);
if(my.skill1==1){my.material = NM_C3_Metal;}
if(my.skill1==2){my.material = NM_C3_Floor;}
}
wait(1);
}
}


This solution works but it's very far from being elegant so it would be great if someone could look into this & maybe come up with some suggestions or, even better, better solution smile


>>Demos free3DModels Tutorials<<
>>>>>>> by Pavle Nikolic <<<<<<<