vertex_program BottleVS hlsl { source bottle.hlsl entry_point BottleVS target vs_2_0 } fragment_program BottlePS hlsl { source bottle.hlsl entry_point BottlePS target ps_3_0 } fragment_program BottlePhotonMapPS hlsl { source bottle.hlsl entry_point BottlePhotonMapPS target ps_3_0 } material bottle { transparency_casts_shadows on technique { pass { IllumTechniques { RenderTechnique ColorCubeMap { update_interval 1 distance_calc false face_angle_calc false update_all_face false } RenderTechnique DistanceCubeMap { update_interval 1 distance_calc false face_angle_calc false update_all_face false } RenderTechnique CausticCaster { attenuation 5.0 update_all_face false photonmap_resolution 128 photon_map_material BottlePhotonMap caustic_map_material BottleCauMap } } vertex_program_ref BottleVS { param_named_auto worldViewProj worldviewproj_matrix param_named_auto world world_matrix param_named_auto worldI inverse_world_matrix } fragment_program_ref BottlePS { param_named_auto cameraPos camera_position param_named_auto lightPosition light_position 0 param_named color float3 0.65 0.4 0.2 } //Cube map for reflections and refractions texture_unit { cubic_texture cubemap.jpg combinedUVW tex_address_mode clamp colour_op replace } //Cube map of distances texture_unit { cubic_texture cubemap.jpg combinedUVW tex_address_mode clamp colour_op replace } } } } material bottle2 { transparency_casts_shadows on technique { pass { IllumTechniques { RenderTechnique ColorCubeMap { update_interval 1 distance_calc false face_angle_calc false update_all_face false } RenderTechnique DistanceCubeMap { update_interval 1 distance_calc false face_angle_calc false update_all_face false } RenderTechnique CausticCaster { attenuation 8.0 update_all_face false photonmap_resolution 128 photon_map_material Bottle2PhotonMap caustic_map_material Bottle2CauMap } } vertex_program_ref BottleVS { param_named_auto worldViewProj worldviewproj_matrix param_named_auto world world_matrix param_named_auto worldI inverse_world_matrix } fragment_program_ref BottlePS { param_named_auto cameraPos camera_position param_named_auto lightPosition light_position 0 param_named color float3 0.2 0.65 0.2 } //Cube map for reflections and refractions texture_unit { cubic_texture cubemap.jpg combinedUVW tex_address_mode clamp colour_op replace } //Cube map of distances texture_unit { cubic_texture cubemap.jpg combinedUVW tex_address_mode clamp colour_op replace } } } } material BottlePhotonMap { technique { pass { vertex_program_ref BottleVS { param_named_auto worldViewProj worldviewproj_matrix param_named_auto world world_matrix param_named_auto worldIT inverse_transpose_world_matrix } fragment_program_ref BottlePhotonMapPS { param_named_auto cameraPos camera_position param_named lastCenter float3 0 0 0 } //Cube map for reflections and refractions texture_unit { cubic_texture filtering none //tex_address_mode clamp } } } } material Bottle2PhotonMap { technique { pass { vertex_program_ref BottleVS { param_named_auto worldViewProj worldviewproj_matrix param_named_auto world world_matrix param_named_auto worldIT inverse_transpose_world_matrix } fragment_program_ref BottlePhotonMapPS { param_named_auto cameraPos camera_position param_named lastCenter float3 0 0 0 } //Cube map for reflections and refractions texture_unit { cubic_texture filtering none //tex_address_mode clamp } } } } material BottleCauMap { technique { pass cull_hardware none cull_software none lighting off scene_blend add scene_blend src_alpha one depth_write off point_sprites on vertex_program_ref GameTools/CauVS { param_named_auto worldViewProj worldviewproj_matrix param_named_auto worldView worldview_matrix param_named_auto Proj projection_matrix param_named_auto resolution viewport_width param_named CauSpriteSize float 11.0 } fragment_program_ref GameTools/CauPS { param_named CauSpriteIntens float 0.11 param_named color float3 0.65 0.4 0.2 } texture_unit { vertex_texture true texture flare.png } texture_unit { texture PowerOfPhotonHitTexel.dds } } } } material Bottle2CauMap { technique { pass cull_hardware none cull_software none lighting off scene_blend add scene_blend src_alpha one depth_write off point_sprites on vertex_program_ref GameTools/CauVS { param_named_auto worldViewProj worldviewproj_matrix param_named_auto worldView worldview_matrix param_named_auto Proj projection_matrix param_named_auto resolution viewport_width param_named CauSpriteSize float 11.0 } fragment_program_ref GameTools/CauPS { param_named CauSpriteIntens float 0.10 param_named color float3 0.2 0.65 0.2 } texture_unit { vertex_texture true texture flare.png } texture_unit { texture PowerOfPhotonHitTexel.dds } } } }