2012-04-03 14:37:54 +00:00
|
|
|
vertex_program Water/GlassVP cg
|
|
|
|
{
|
|
|
|
source GlassVP.cg
|
|
|
|
entry_point glass_vp
|
|
|
|
profiles vs_1_1 arbvp1
|
|
|
|
|
|
|
|
default_params
|
|
|
|
{
|
|
|
|
param_named_auto worldViewProj worldviewproj_matrix
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fragment_program Water/GlassFP cg
|
|
|
|
{
|
|
|
|
source GlassFP.cg
|
|
|
|
entry_point main_ps
|
|
|
|
profiles ps_2_0 arbfp1
|
|
|
|
}
|
|
|
|
|
2012-04-03 17:10:02 +00:00
|
|
|
vertex_program Water_VP cg
|
|
|
|
{
|
|
|
|
source water.cg
|
|
|
|
entry_point main_vp
|
|
|
|
profiles vs_2_x arbvp1
|
|
|
|
|
|
|
|
default_params
|
|
|
|
{
|
|
|
|
param_named_auto wvpMat worldviewproj_matrix
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fragment_program Water_FP cg
|
|
|
|
{
|
|
|
|
source water.cg
|
|
|
|
entry_point main_fp
|
|
|
|
profiles ps_2_x arbfp1
|
|
|
|
}
|
|
|
|
|
|
|
|
material Water
|
|
|
|
{
|
|
|
|
technique
|
|
|
|
{
|
|
|
|
pass
|
|
|
|
{
|
|
|
|
scene_blend alpha_blend
|
|
|
|
depth_write off
|
|
|
|
|
|
|
|
vertex_program_ref Water_VP
|
|
|
|
{
|
2012-04-05 09:18:58 +00:00
|
|
|
//param_named_auto camPosObjSpace camera_position_object_space
|
2012-04-03 17:10:02 +00:00
|
|
|
}
|
|
|
|
fragment_program_ref Water_FP
|
|
|
|
{
|
2012-04-03 19:16:43 +00:00
|
|
|
param_named_auto time time 0.1
|
2012-04-03 20:04:37 +00:00
|
|
|
param_named_auto fogColour fog_colour
|
|
|
|
param_named_auto fogParams fog_params
|
2012-04-04 23:21:36 +00:00
|
|
|
param_named_auto renderTargetFlipping render_target_flipping
|
2012-04-05 08:39:22 +00:00
|
|
|
param_named_auto far far_clip_distance
|
2012-04-03 17:10:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
texture_unit reflectionMap
|
|
|
|
{
|
|
|
|
texture WaterReflection
|
2012-04-03 19:16:43 +00:00
|
|
|
tex_address_mode clamp
|
|
|
|
}
|
2012-04-04 23:21:36 +00:00
|
|
|
|
|
|
|
texture_unit refractionMap
|
|
|
|
{
|
|
|
|
tex_address_mode clamp
|
|
|
|
}
|
|
|
|
|
2012-04-05 08:39:22 +00:00
|
|
|
texture_unit depthMap
|
|
|
|
{
|
|
|
|
tex_address_mode clamp
|
|
|
|
}
|
|
|
|
|
2012-04-03 19:16:43 +00:00
|
|
|
texture_unit normalMap
|
|
|
|
{
|
|
|
|
texture WaterNormal2.tga
|
2012-04-03 17:10:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
technique
|
|
|
|
{
|
|
|
|
scheme Map
|
|
|
|
pass
|
|
|
|
{
|
|
|
|
scene_blend alpha_blend
|
|
|
|
depth_write off
|
|
|
|
diffuse 0 0 0 1
|
|
|
|
emissive 0.6 0.7 1.0
|
|
|
|
ambient 0 0 0
|
|
|
|
texture_unit
|
|
|
|
{
|
|
|
|
// texture names set via code
|
|
|
|
scale 0.1 0.1
|
|
|
|
alpha_op_ex source1 src_manual src_current 0.7
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-04-03 14:37:54 +00:00
|
|
|
material Water/Compositor
|
|
|
|
{
|
|
|
|
technique
|
|
|
|
{
|
|
|
|
pass
|
|
|
|
{
|
|
|
|
depth_check off
|
|
|
|
vertex_program_ref Water/GlassVP
|
|
|
|
{
|
|
|
|
param_named_auto timeVal time 0.25
|
|
|
|
param_named scale float 0.1
|
|
|
|
}
|
|
|
|
|
|
|
|
fragment_program_ref Water/GlassFP
|
|
|
|
{
|
|
|
|
param_named tintColour float4 0 0.35 0.35 1
|
|
|
|
}
|
|
|
|
|
|
|
|
texture_unit RT
|
|
|
|
{
|
|
|
|
tex_coord_set 0
|
|
|
|
tex_address_mode clamp
|
|
|
|
filtering linear linear linear
|
|
|
|
}
|
|
|
|
|
|
|
|
texture_unit
|
|
|
|
{
|
2012-04-03 15:07:16 +00:00
|
|
|
texture WaterNormal2.tga 2d
|
2012-04-03 14:37:54 +00:00
|
|
|
tex_coord_set 1
|
|
|
|
//tex_address_mode clamp
|
|
|
|
filtering linear linear linear
|
|
|
|
}
|
|
|
|
texture_unit
|
|
|
|
{
|
|
|
|
texture caustic_0.png 2d
|
|
|
|
tex_coord_set 2
|
|
|
|
//tex_address_mode clamp
|
|
|
|
filtering linear linear linear
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|