Originally Posted By: PadMalcom
Is there a way to turn the fog off? Even if I have no fog enabled I see a white dust everywhere.


I just learned some time ago that vecFogColor.w carries a 0 or 1 if fog is enabled/disabled. So if you write instead:

Code:
Out.TexFog.z  = vecFogColor.w * (1 - saturate((vecFog.y - Out.Pos.z) * vecFog.z));



it should work.

Originally Posted By: thorus
hey guys how can i scale the texture ?


Use the function set_modelTex3Nm_tiling.

Originally Posted By: PadMalcom
I tried to use the shader that way (...) but my terrain remains white. Any idea why? The skins use exactly the same images as the demo.


The shader expects:

Quote:
entSkin1 = mask
entSkin2 = base texture
entSkin3 = texture 1, controlled by mask red channel
entSkin4 = texture 2, controlled by mask green channel

mtlSkin2 = base normalmap
mtlSkin3 = texture 1 normalmap
mtlSkin4 = texture 2 normalmap


whereas the blue channel of the mask in entSkin1 carries the shadowmap.

As can be seen in the .c file of the shader, mtlSkins 2, 3 and 4 are fetched automatically from entSkin 5-7:

Code:
e->material->skin2 = bmap_for_entity(e, 5);
e->material->skin3 = bmap_for_entity(e, 6);
e->material->skin4 = bmap_for_entity(e, 7);



That way you can just put all your textures, mask and normalmaps into the terrain entity file and you are done.

So, the way you are putting stuff into the terrain entity looks right. Maybe try bmap_to_mipmap(BMAP*) for each bitmap. Maybe the function bmap_for_entity fails somehow, try to replace the calls in init_modelTex3Nm with ent_getskin (don't forget the +1 shift on the index between bmap_for_entity and ent_getskin).

Please tell me if it still doesn't work. - As soon as the contest is over and I can return to my private project, I will also begin to write a new terrain shader, if you are looking forward for something fresh wink