⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 alpha_splat.material

📁 使用stl技术,(还没看,是听说的)
💻 MATERIAL
字号:
// 1 pass for those who can afford 7 texture units...
// 4 textures + 3 alpha splat masks
material alpha_splat_test_1_pass
{
	lod_distances 28000
	technique
	{
		lod_index 0
		// first pass, base texture + 1 splat
		pass
		{
			//base
			texture_unit
			{
				texture terrain.Base.png
				tex_address_mode clamp
			}
			// 1st splat
			texture_unit
			{
				alpha_op_ex source1 src_texture src_texture
				colour_op_ex source1 src_current src_current
				texture terrain.AplhaSplatLightMaps.1.png
				tex_address_mode clamp
			}
			texture_unit
			{
				colour_op_ex blend_current_alpha src_texture src_current
				texture dirt01.jpg
				scale 0.01 0.01
				tex_address_mode mirror
			}
			// 2nd splat
			texture_unit
			{
				alpha_op_ex source1 src_texture src_texture
				colour_op_ex source1 src_current src_current
				texture terrain.AplhaSplatLightMaps.2.png
				tex_address_mode clamp
			}
			texture_unit
			{
				colour_op_ex blend_current_alpha src_texture src_current
				texture dirt03.jpg
				scale 0.01 0.01
				tex_address_mode mirror
			}
			// 3rd splat
			texture_unit
			{
				alpha_op_ex source1 src_texture src_texture
				colour_op_ex source1 src_current src_current
				texture terrain.AplhaSplatLightMaps.3.png
				tex_address_mode clamp
			}
			texture_unit
			{
				colour_op_ex blend_current_alpha src_texture src_current
				texture dirt04.jpg
				scale 0.01 0.01
				tex_address_mode mirror
			}
		}
	}
	technique
	{
		lod_index 1
		pass
		{
			lighting off
			texture_unit
			{
				texture terrain.Base.png
				tex_address_mode clamp
				tex_coord_set 0
			}
		}
	}
}


// separate passes for each texture/splat
// good for fall back technique
material alpha_splat_test_4_pass
{
	lod_distances 700 2000
	technique
	{
		lod_index 0
		// base texture
		pass
		{
			lighting off
			texture_unit
			{
				texture terrain.Base.png
				tex_coord_set 0
			}
		}
		// splat 1
		pass
		{
			lighting off
			scene_blend alpha_blend
			texture_unit
			{
				//alpha mask
				colour_op_ex blend_diffuse_alpha src_current src_texture
				texture terrain.AplhaSplatLightMaps.1.png
				tex_coord_set 0

			}
			texture_unit
			{
				texture dirt03.jpg
				tex_address_mode mirror
				scale 0.01 0.01
				// we could use tex_coord_set 0 and scale
				//scale 0.500 0.500
				//tex_address_mode mirror

			}
		}
		// splat 2
		pass
		{
			lighting off
			scene_blend alpha_blend
			texture_unit
			{
				//alpha mask
				colour_op_ex blend_diffuse_alpha src_current src_texture
				texture terrain.AplhaSplatLightMaps.2.png
				tex_coord_set 0

			}
			texture_unit
			{
				texture dirt06.jpg
				scale 0.01 0.01

				// we could use tex_coord_set 0 and scale
				//scale 0.500 0.500
				//tex_address_mode mirror
			}
		}
		// splat 3
		pass
		{
			lighting off

			scene_blend alpha_blend

			texture_unit
			{
				//alpha mask
				colour_op_ex blend_diffuse_alpha src_current src_texture
				texture terrain.AplhaSplatLightMaps.3.png
				tex_coord_set 0

			}
			texture_unit
			{
				texture dirt04.jpg
				scale 0.01 0.01

				// we could use tex_coord_set 0 and scale
				//scale 0.500 0.500
				//tex_address_mode mirror

			}
		}

	}
	technique
	{
		lod_index 1
		pass
		{
			lighting off
			texture_unit
			{
				texture terrain.Base.png
				tex_coord_set 0
			}
			texture_unit
			{
				// Light Alpha map
				texture terrain.Light.png
				tex_address_mode clamp
				colour_op_ex modulate_x2 src_current src_texture
				//colour_op modulate
				tex_coord_set 0
			}
		}
	}
	technique
	{
		lod_index 2
		pass
		{
			lighting off
			texture_unit
			{
				texture terrain.Base.png
				tex_coord_set 0
			}
		}
	}
}


// separate passes for each texture/splat
// good for fall back technique
// this one is Lighted
material alpha_splat_test_4_pass_light
{

	lod_distances 700
	technique
	{
		lod_index 0

		// base texture
		pass
		{

			lighting off

			texture_unit
			{
				texture terrain.Base.png
				tex_coord_set 0
			}
			texture_unit
			{
				// Light Alpha map
				texture terrain.Light.png
				tex_address_mode clamp
				colour_op_ex modulate_x2 src_current src_texture
				tex_coord_set 0
				//colour_op modulate
			}

		}


		// splat 1
		pass
		{
			lighting off

			scene_blend alpha_blend

			texture_unit
			{
				//alpha mask
				alpha_op_ex source1 src_texture src_texture
				//colour_op_ex source1 src_current src_current

				texture terrain.AplhaSplatLightMaps.1.png
				tex_coord_set 0

			}
			texture_unit
			{

				alpha_op_ex source1 src_current src_current
				colour_op_ex modulate src_current src_texture

				texture dirt03.jpg
				scale 0.01 0.01
				//tex_coord_set 0
				//scale 0.1 0.1
				//tex_address_mode mirror

			}
		}

			// splat 2
		pass
		{
			lighting off

			scene_blend alpha_blend

			texture_unit
			{
				//alpha mask
				alpha_op_ex source1 src_texture src_texture
				//colour_op_ex source1 src_current src_current
				texture terrain.AplhaSplatLightMaps.2.png
				tex_coord_set 0

			}
			texture_unit
			{

				alpha_op_ex source1 src_current src_current
				colour_op_ex modulate src_current src_texture

				texture dirt06.jpg
				scale 0.01 0.01
				//tex_coord_set 0
				//scale 0.1 0.1
				//tex_address_mode mirror

			}
		}

			// splat 3
		pass
		{
			lighting off

			scene_blend alpha_blend

			texture_unit
			{
				//alpha mask
				alpha_op_ex source1 src_texture src_texture
				//colour_op_ex source1 src_current src_current
				texture terrain.AplhaSplatLightMaps.3.png
				tex_coord_set 0

			}
			texture_unit
			{
				alpha_op_ex source1 src_current src_current
				colour_op_ex modulate src_current src_texture


				texture dirt04.jpg
				scale 0.01 0.01
				//tex_coord_set 0
				//scale 0.01 0.01
				//tex_address_mode mirror

			}
		}

	}
	technique
	{
		lod_index 1
		pass
		{

			lighting off

			texture_unit
			{
				texture terrain.Base.png
				tex_coord_set 0
			}

			texture_unit
			{
				// Light Alpha map
				texture terrain.Light.png
				tex_address_mode clamp
				//colour_op_ex modulate_x2 src_current src_texture
				tex_coord_set 0
				colour_op modulate
			}
		}
	}
	technique
	{
		lod_index 2
		pass
		{

			lighting off

			texture_unit
			{
				texture terrain.Base.png
				tex_coord_set 0
			}
		}
	}
}
// 1 pass for those who can afford 7 texture units...
// 4 textures + 3 alpha splat masks that also contains light info
// this one is Lighted
material alpha_splat_test_1_pass_light
{
	lod_distances 700 2000
	technique
	{
		lod_index 0
		pass
		{

			lighting off

			//base
			texture_unit
			{
				texture terrain.Base.png
				tex_coord_set 0
			}


		// 1st splat
			texture_unit
			{
				alpha_op_ex source1 src_texture src_texture
				colour_op_ex source1 src_current src_current
				texture terrain.AplhaSplatLightMaps.1.png
				tex_coord_set 0
			}
			texture_unit
			{
				colour_op_ex blend_current_alpha src_texture src_current
				texture dirt01.jpg
				scale 0.01 0.01
			}

			// 2nd splat
			texture_unit
			{
				alpha_op_ex source1 src_texture src_texture
				colour_op_ex source1 src_current src_current
				texture terrain.AplhaSplatLightMaps.2.png
				tex_coord_set 0
			}
			texture_unit
			{
				colour_op_ex blend_current_alpha src_texture src_current
				texture dirt03.jpg
				scale 0.01 0.01
			}

			// 3rd splat
			texture_unit
			{
				alpha_op_ex source1 src_texture src_texture
				colour_op_ex source1 src_current src_current
				texture terrain.AplhaSplatLightMaps.3.png
				tex_coord_set 0
			}
			texture_unit
			{
				colour_op_ex blend_current_alpha src_texture src_current
				texture dirt04.jpg
				scale 0.01 0.01
			}

			texture_unit
			{
				// Light Alpha map
				texture terrain.Light.png
				tex_address_mode clamp
				//colour_op_ex modulate_x2 src_current src_texture
				colour_op modulate
				tex_coord_set 0
			}
		}
	}
	technique
	{
		lod_index 1
		pass
		{

			lighting off

			texture_unit
			{
				texture terrain.Base.png
				tex_coord_set 0
			}

			texture_unit
			{
				// Light Alpha map
				texture terrain.Light.png
				tex_address_mode clamp
				colour_op_ex modulate_x2 src_current src_texture
				//colour_op modulate
				tex_coord_set 0
			}
		}
	}
	technique
	{
		lod_index 2
		pass
		{

			lighting off

			texture_unit
			{
				texture terrain.Base.png
				tex_coord_set 0
			}
		}
	}
}



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -