/* //---------------------------- // Distortion effects //---------------------------- vertex_program Examples/FresnelRefractReflectVP glsl glsles glslang hlsl { source Example_FresnelVp.glsl } fragment_program Examples/FresnelRefractReflectFP glsl glsles glslang hlsl { source Example_FresnelFp.glsl default_params { // assign samplers as required by GLSL param_named noiseMap int 0 param_named reflectMap int 1 param_named refractMap int 2 } } */ material Water/Above { technique { pass { lighting on ambient 1.0 1.0 1.0 1.0 diffuse 0.0 0.2 0.5 1.0 cull_hardware none cull_software none /* vertex_program_ref Examples/FresnelRefractReflectVP { param_named_auto worldViewProjMatrix worldviewproj_matrix param_named_auto textureProjMatrix texture_worldviewproj_matrix 0 param_named_auto eyePosition camera_position_object_space param_named_auto timeVal time 0.05 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 Examples/FresnelRefractReflectFP { param_named fresnelBias float -0.1 param_named fresnelScale float 1.8 param_named fresnelPower float 8 param_named tintColour float4 0 0.05 0.05 1 param_named noiseScale float 0.05 } */ vertex_program_ref Water/water_vp { } fragment_program_ref Water/water_fp { } /* // Noise texture_unit { // Perlin noise volume texture waves2.png // min / mag filtering, no mip filtering linear linear none tex_address_mode mirror } // Reflection texture_unit { content_type compositor Fresnel reflection tex_address_mode mirror } // Refraction texture_unit { content_type compositor Fresnel refraction tex_address_mode mirror } // Normal texture_unit { texture waves2.png sampler_ref RTSS/NormalMapSampler // RT Shader system section. rtshader_system { normal_map tangent_space } tex_address_mode mirror } */ texture_unit { texture ReflectionRefractionTexture tex_address_mode mirror filtering linear linear linear } /* texture_unit { texture RefractionTexture tex_address_mode mirror filtering linear linear linear } */ } } rtshader_system { // Override lighting stage with per pixel lighting. lighting_stage per_pixel } } material Water/Below { technique { pass { lighting on ambient 1.0 1.0 1.0 1.0 diffuse 0.0 0.2 0.5 1.0 cull_hardware none cull_software none vertex_program_ref Water/water_vp { } fragment_program_ref Water/water_fp { } /* // Noise texture_unit { // Perlin noise volume texture waves2.png // min / mag filtering, no mip filtering linear linear none tex_address_mode mirror } // Reflection texture_unit { content_type compositor Fresnel reflection tex_address_mode mirror } // Refraction texture_unit { content_type compositor Fresnel refraction tex_address_mode mirror } */ texture_unit { texture ReflectionRefractionTexture tex_address_mode mirror filtering linear linear linear } /* texture_unit { texture RefractionTexture tex_address_mode mirror filtering linear linear linear } */ } } rtshader_system { // Override lighting stage with per pixel lighting. lighting_stage per_pixel } } /* material Water/Depth { technique { pass { cull_hardware none alpha_rejection greater_equal 0.5 vertex_program_ref Water/depth_vp { param_named_auto world world_matrix param_named_auto worldViewProj worldviewproj_matrix } fragment_program_ref Water/depth_fp { param_named_auto cameraPosition camera_position } } } } */