Hackslash
18-04-2009 20:02:48
I'm using ETM 2.3.1 and searched the forum for getting lighting work. I found the shaders of SongOfTheWeave which work perfectly for me but there is one issue which i can't figure out. The first texture in the materialfile of the lighting/splatting pass is not affected by the light shader. This texture is also the base texture when creating a terrain. There is no normal map on the texture as well. All other textures after the first one work as intended.
My Material file is:
The CG and Program file i copied from SongOfTheWeave.
So Anyone Know how to get the first texture (splatting0 and splatting0_norm) displayed with normal map and working with light?
Any help would be great .
My Material file is:
material ETTerrainMaterial
{
technique
{
pass Ambient
{
vertex_program_ref ETAmbient_VS
{
}
}
pass Lighting
{
scene_blend add
iteration once_per_light
vertex_program_ref ET/Programs/VSDynLightingNM
{
}
fragment_program_ref ET/Programs/PSDynLightingNM
{
}
texture_unit
{
// first coverage map, dynamically managed
texture ETSplatting0
}
texture_unit
{
// second coverage map, dynamically managed
texture ETSplatting1
}
texture_unit
{
texture splatting0_norm.png // <- not working
}
texture_unit
{
texture splatting1_norm.png
}
texture_unit
{
texture splatting2_norm.png
}
texture_unit
{
texture splatting3_norm.png
}
texture_unit
{
texture splatting4_norm.png
}
texture_unit
{
texture splatting5_norm.png
}
}
pass
{
// splatting pass
scene_blend modulate
vertex_program_ref ET/Programs/VSLodMorph2
{
}
fragment_program_ref ET/Programs/PSSplat2
{
param_named splatScaleX float 20
param_named splatScaleZ float 20
}
texture_unit
{
// first coverage map, dynamically managed
texture ETSplatting0
}
texture_unit
{
// second coverage map, dynamically managed
texture ETSplatting1
}
// splatting textures
texture_unit
{
texture splatting0.png // <- not working
}
texture_unit
{
texture splatting1.png
}
texture_unit
{
texture splatting2.png
}
texture_unit
{
texture splatting3.png
}
texture_unit
{
texture splatting4.png
}
texture_unit
{
texture splatting5.png
}
}
}
}
The CG and Program file i copied from SongOfTheWeave.
So Anyone Know how to get the first texture (splatting0 and splatting0_norm) displayed with normal map and working with light?
Any help would be great .