[1094] | 1 | material GameTools/PhotonMapCaustic
|
---|
| 2 | {
|
---|
| 3 | technique
|
---|
| 4 | {
|
---|
| 5 |
|
---|
| 6 | pass
|
---|
| 7 | {
|
---|
| 8 | vertex_program_ref GameTools/CubeMap/VertexPrograms/LocalizedVS
|
---|
| 9 | {
|
---|
| 10 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
| 11 | param_named_auto world world_matrix
|
---|
| 12 | param_named_auto worldIT inverse_transpose_world_matrix
|
---|
| 13 | }
|
---|
| 14 | fragment_program_ref GameTools/PhotonMapCausticPS
|
---|
| 15 | {
|
---|
| 16 | param_named_auto cameraPos camera_position
|
---|
| 17 | param_named lastCenter float3 0 0 0
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | //distanec cubemap
|
---|
| 21 | texture_unit
|
---|
| 22 | {
|
---|
| 23 | cubic_texture
|
---|
| 24 | filtering none
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | material GameTools/Cau
|
---|
| 32 | {
|
---|
| 33 | technique
|
---|
| 34 | {
|
---|
| 35 | pass
|
---|
| 36 | {
|
---|
| 37 | cull_hardware none
|
---|
| 38 | cull_software none
|
---|
| 39 | lighting off
|
---|
| 40 | scene_blend add
|
---|
| 41 | scene_blend src_alpha one
|
---|
| 42 | depth_write off
|
---|
| 43 | point_sprites on
|
---|
| 44 |
|
---|
| 45 | vertex_program_ref GameTools/CauVS
|
---|
| 46 | {
|
---|
| 47 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
| 48 | param_named_auto worldView worldview_matrix
|
---|
| 49 | param_named_auto Proj projection_matrix
|
---|
| 50 | param_named_auto resolution viewport_width
|
---|
| 51 | param_named CauSpriteSize float 10.0
|
---|
| 52 | }
|
---|
| 53 | fragment_program_ref GameTools/CauPS
|
---|
| 54 | {
|
---|
| 55 | param_named CauSpriteIntens float 0.15
|
---|
| 56 | param_named color float3 0.7 0.7 0.5
|
---|
| 57 | }
|
---|
| 58 |
|
---|
| 59 | texture_unit
|
---|
| 60 | {
|
---|
| 61 | vertex_texture true
|
---|
| 62 | texture flare.png
|
---|
| 63 | }
|
---|
| 64 | texture_unit
|
---|
| 65 | {
|
---|
| 66 | texture PowerOfPhotonHitTexel.dds
|
---|
| 67 | }
|
---|
| 68 |
|
---|
| 69 | }
|
---|
| 70 | }
|
---|
| 71 | }
|
---|
| 72 |
|
---|
[1347] | 73 | vertex_program GameTools/CauTriVS hlsl
|
---|
| 74 | {
|
---|
| 75 | source GameTools_CauCube.hlsl
|
---|
| 76 | entry_point CauVS
|
---|
| 77 | target vs_3_0
|
---|
| 78 | }
|
---|
[1094] | 79 |
|
---|
[1347] | 80 | fragment_program GameTools/CauTriPS hlsl
|
---|
| 81 | {
|
---|
| 82 | source GameTools_CauCube.hlsl
|
---|
| 83 | entry_point CauPS
|
---|
| 84 | target ps_2_0
|
---|
| 85 |
|
---|
| 86 | }
|
---|
| 87 | material GameTools/CauTri
|
---|
| 88 | {
|
---|
| 89 | technique
|
---|
| 90 | {
|
---|
| 91 | pass
|
---|
| 92 | {
|
---|
| 93 | cull_hardware none
|
---|
| 94 | cull_software none
|
---|
| 95 | lighting off
|
---|
| 96 | scene_blend add
|
---|
| 97 | scene_blend src_alpha one
|
---|
| 98 | depth_write off
|
---|
| 99 |
|
---|
| 100 | vertex_program_ref GameTools/CauTriVS
|
---|
| 101 | {
|
---|
| 102 | param_named_auto worldView worldview_matrix
|
---|
| 103 | param_named_auto Proj projection_matrix
|
---|
| 104 | param_named_auto resolution viewport_width
|
---|
| 105 | }
|
---|
| 106 | fragment_program_ref GameTools/CauTriPS
|
---|
| 107 | {
|
---|
| 108 | param_named color float3 0.7 0.7 0.5
|
---|
| 109 | }
|
---|
| 110 |
|
---|
| 111 | texture_unit
|
---|
| 112 | {
|
---|
| 113 | vertex_texture true
|
---|
| 114 | texture flare.png
|
---|
| 115 | }
|
---|
| 116 | }
|
---|
| 117 | }
|
---|
| 118 | }
|
---|
| 119 |
|
---|
| 120 |
|
---|
[1094] | 121 | material GameTools/CausticGlass
|
---|
| 122 | {
|
---|
| 123 |
|
---|
| 124 | technique
|
---|
| 125 | {
|
---|
| 126 |
|
---|
| 127 | pass
|
---|
| 128 | {
|
---|
| 129 | IllumTechniques
|
---|
| 130 | {
|
---|
| 131 | RenderTechnique ColorCubeMap
|
---|
| 132 | {
|
---|
| 133 | update_interval 0
|
---|
| 134 | distance_calc true 3.5
|
---|
| 135 | }
|
---|
| 136 | RenderTechnique DistanceCubeMap
|
---|
| 137 | {
|
---|
| 138 | update_interval 0
|
---|
| 139 | distance_calc true 3.5
|
---|
| 140 | }
|
---|
| 141 | RenderTechnique CausticCaster
|
---|
| 142 | {
|
---|
[1347] | 143 | attenuation 0
|
---|
| 144 | caustic_map_material GameTools/CauTri
|
---|
| 145 | use_triangles true
|
---|
[1094] | 146 | }
|
---|
| 147 |
|
---|
| 148 | }
|
---|
| 149 |
|
---|
| 150 |
|
---|
| 151 | vertex_program_ref GameTools/CubeMap/VertexPrograms/LocalizedVS
|
---|
| 152 | {
|
---|
| 153 | param_named_auto worldViewProj worldviewproj_matrix
|
---|
| 154 | param_named_auto world world_matrix
|
---|
| 155 | }
|
---|
| 156 | fragment_program_ref GameTools/CubeMap/FragmentPrograms/LocalizedPS
|
---|
| 157 | {
|
---|
| 158 | param_named_auto cameraPos camera_position
|
---|
| 159 | param_named_auto lightPosition light_position 0
|
---|
| 160 | }
|
---|
| 161 |
|
---|
| 162 | //Cube map for reflections and refractions
|
---|
| 163 | texture_unit
|
---|
| 164 | {
|
---|
| 165 | cubic_texture cubemap.jpg combinedUVW
|
---|
| 166 | tex_address_mode clamp
|
---|
| 167 | colour_op replace
|
---|
| 168 | }
|
---|
| 169 |
|
---|
| 170 | //Cube map of distances
|
---|
| 171 | texture_unit
|
---|
| 172 | {
|
---|
| 173 | cubic_texture cubemap.jpg combinedUVW
|
---|
| 174 | tex_address_mode clamp
|
---|
| 175 | colour_op replace
|
---|
| 176 | }
|
---|
| 177 |
|
---|
| 178 |
|
---|
| 179 | }
|
---|
| 180 | }
|
---|
| 181 | } |
---|