alex_dergian
02-09-2006 11:53:52
I finaly found a way to get the custom materials to load however the convection use of the keyword Alpha is only accessed once in the programm? So it only paints one material on top of the base.
Here is my material code thinking the issue might be in there.
Here is my material code thinking the issue might be in there.
material kazular_fort_inland
{
receive_shadows on
technique
{
// base pass
pass
{
// no lighting
lighting off
texture_unit
{
// We use the grass texture as the base. other textures are blended over it
texture grass_lush.dds
// Scale the texture so, that it looks nice
scale 0.1 0.1
// Only blend colour
//colour_op_ex source1 src_texture src_texture
}
}
// dirt pass
pass
{
// no lighting
lighting off
// blend with former pass
scene_blend alpha_blend
// only overwrite fragments with the same depth
depth_func equal
// alpha map for the dirt
texture_unit
{
texture Alpha
alpha_op_ex source1 src_texture src_texture
// and colour from last pass
colour_op_ex source2 src_texture src_texture
}
// detail texture
texture_unit
{
texture defalt.dds
scale 0.15 0.15
// alpha blend colour with colour from last pass
colour_op_ex blend_diffuse_alpha src_texture src_current
}
}
// ground pass
pass
{
// no lighting
lighting off
// blend with former pass
scene_blend alpha_blend
// only overwrite fragments with the same depth
depth_func equal
// alpha map for the ground
texture_unit
{
texture Alpha
alpha_op_ex source1 src_texture src_texture
// and colour from last pass
colour_op_ex source2 src_texture src_texture
}
// detail texture
texture_unit
{
texture ground_root_moss.dds
scale 0.15 0.15
// alpha blend colour with colour from last pass
colour_op_ex blend_diffuse_alpha src_texture src_current
}
}
// lighting pass
pass
{
ambient 0.5 0.5 0.5 1
diffuse 0.3 0.3 0.3
depth_func equal
scene_blend zero src_colour
}
}
}