文章编辑人员:雪舞
内容测试时间:2023-7-1 23:39:28
问题截图:
错误代码:
material shader_water_mirror
{
technique WaterFog
{
//scheme WaterFog
// render fog under water
pass
{
depth_write off
//scene_blend alpha_blend
separate_scene_blend src_alpha one_minus_src_alpha zero zero
vertex_program_ref Water/water_Fog_mirror/VS
{
}
fragment_program_ref Water/water_Fog_mirror/PS
{
}
texture_unit DepthTex
{
tex_address_mode clamp
filtering none
content_type compositor SceneRender depth_buffer
}
}
}
technique Effect
{
pass
{
depth_write off
//fog_override true none
vertex_program_ref Water/water_MirrorReflectionReraction/VS
{
}
fragment_program_ref Water/water_MirrorReflectionReraction/PS
{
}
texture_unit
{
texture oceanwaves.dds 2d
filtering trilinear
}
texture_unit
{
texture ReflectTexInput
filtering trilinear
}
texture_unit RefractTex
{
tex_address_mode clamp
filtering none
content_type compositor SceneRender scene_buffer
}
}
}
}
正确代码:
material shader_water_mirror
{
technique
{
pass
{
ambient 0.588235 0.588235 0.588235 1
diffuse 0.588235 0.588235 0.588235 1
specular 0.9 0.9 0.9 20
scene_blend alpha_blend
depth_check on
depth_write off
texture_unit
{
anim_texture jpg_海湖水蓝.dds 20 2
}
texture_unit
{
texture water_depth.tga 1d
colour_op_ex source1 src_current src_texture
colour_op_multipass_fallback one zero
alpha_op_ex modulate src_current src_texture
tex_coord_set 1
tex_address_mode clamp
filtering none none none
}
}
}
}
|