// Derived from ogre samples 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 } 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 { texture WaterNormal1.tga 2d 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 } } } } vertex_program Water/RefractReflectVP cg { source Example_Fresnel.cg entry_point main_vp profiles vs_1_1 arbvp1 } vertex_program Water/RefractReflectVPold cg { source Example_Fresnel.cg entry_point main_vp_old profiles vs_1_1 arbvp1 } fragment_program Water/RefractReflectFP cg { source Example_Fresnel.cg entry_point main_fp // sorry, ps_1_1 and fp20 can't do this profiles ps_2_0 arbfp1 } fragment_program Water/RefractReflectPS asm { source Example_FresnelPS.asm // sorry, only for ps_1_4 :) syntax ps_1_4 } material Water/ReflectionRefraction { // ps_2_0 / arbfp1 technique { pass { vertex_program_ref Water/RefractReflectVP { param_named_auto worldViewProjMatrix worldviewproj_matrix param_named_auto eyePosition camera_position_object_space param_named_auto timeVal time 0.15 param_named scroll float 1 param_named scale float 1 param_named noise float 1 // scroll and noisePos will need updating per frame } fragment_program_ref Water/RefractReflectFP { param_named fresnelBias float -0.1 param_named fresnelScale float 0.8 param_named fresnelPower float 20 param_named tintColour float4 0 0.15 0.15 1 param_named noiseScale float 0.05 } // Water texture_unit { // Water texture texture Water02.jpg // min / mag filtering, no mip filtering linear linear none } // Noise texture_unit { // Perlin noise volume texture waves2.dds // min / mag filtering, no mip filtering linear linear none } // Reflection texture_unit { // Will be filled in at runtime texture reflection tex_address_mode clamp } // Refraction texture_unit { // Will be filled in at runtime texture refraction tex_address_mode clamp } } } // ATI 8500 + technique { pass { vertex_program_ref Water/RefractReflectVPold { param_named_auto worldViewProjMatrix worldviewproj_matrix param_named_auto eyePosition camera_position_object_space param_named fresnelBias float -0.3 param_named fresnelScale float 1.4 param_named fresnelPower float 8 param_named_auto timeVal time_0_1 20 param_named scroll float 1 param_named scale float 4 param_named noise float 1 // scroll and noisePos will need updating per frame } // for ATI RADEON 8500 - 9200 fragment_program_ref Water/RefractReflectPS { // distortionRange param_indexed 0 float 0.025 // tintColour param_indexed 1 float4 0.05 0.12 0.15 1 } // Noise texture_unit { // Perlin noise volume texture perlinvolume.dds 3d // min / mag filtering, no mip filtering linear linear none } // Reflection texture_unit { // Will be filled in at runtime texture Reflection tex_address_mode clamp } // Refraction texture_unit { // Will be filled in at runtime texture Refraction tex_address_mode clamp } } } }