source: GTP/trunk/App/Games/CarDriving_BME/Media/materials/scripts/bottle.material @ 1049

Revision 1049, 6.1 KB checked in by szirmay, 18 years ago (diff)
Line 
1vertex_program BottleVS hlsl
2{
3        source bottle.hlsl
4        entry_point BottleVS
5        target vs_2_0
6}
7
8fragment_program BottlePS hlsl
9{
10        source bottle.hlsl
11        entry_point BottlePS
12        target ps_3_0
13}
14
15fragment_program BottlePhotonMapPS hlsl
16{
17        source bottle.hlsl
18        entry_point BottlePhotonMapPS
19        target ps_3_0
20}
21
22material bottle
23{
24
25transparency_casts_shadows on
26
27        technique
28        {
29                pass
30                {
31                        IllumTechniques
32                        {
33                                RenderTechnique ColorCubeMap
34                                {
35                                        update_interval         1
36                                        distance_calc false
37                                        face_angle_calc false
38                                        update_all_face         false
39                                }
40                                RenderTechnique DistanceCubeMap
41                                {
42                                        update_interval         1
43                                        distance_calc false
44                                        face_angle_calc false
45                                        update_all_face         false
46                                }
47                                RenderTechnique CausticCaster
48                                {
49                                        attenuation 5.0
50                                        update_all_face         false
51                                        photonmap_resolution    128
52                                        photon_map_material BottlePhotonMap
53                                        caustic_map_material BottleCauMap
54                                }
55                               
56                        }
57             
58             
59                        vertex_program_ref BottleVS
60                        {       
61                                        param_named_auto worldViewProj worldviewproj_matrix
62                                param_named_auto world world_matrix
63                                param_named_auto worldIT inverse_transpose_world_matrix
64                        }
65                        fragment_program_ref BottlePS
66                        {
67                                param_named_auto cameraPos camera_position
68                                param_named_auto lightPosition light_position 0
69                                param_named color float3 0.65 0.4 0.2
70                        }
71                               
72                        //Cube map for reflections and refractions     
73                        texture_unit
74                        {
75                        cubic_texture cubemap.jpg combinedUVW
76                        tex_address_mode clamp
77                        colour_op replace
78                        }
79
80                        //Cube map of distances
81                        texture_unit
82                        {
83                        cubic_texture cubemap.jpg combinedUVW
84                        tex_address_mode clamp
85                        colour_op replace
86                        }
87
88
89                       
90                }
91        }
92}
93
94
95material bottle2
96{
97
98transparency_casts_shadows on
99        technique
100        {
101                pass
102                {
103                        IllumTechniques
104                        {
105                                RenderTechnique ColorCubeMap
106                                {
107                                        update_interval         1
108                                        distance_calc false
109                                        face_angle_calc false
110                                        update_all_face         false
111                                }
112                                RenderTechnique DistanceCubeMap
113                                {
114                                        update_interval         1
115                                        distance_calc false
116                                        face_angle_calc false
117                                        update_all_face         false
118                                }
119                                RenderTechnique CausticCaster
120                                {
121                                        attenuation 8.0
122                                        update_all_face         false
123                                        photonmap_resolution    128
124                                        photon_map_material Bottle2PhotonMap
125                                        caustic_map_material Bottle2CauMap
126                                }
127                               
128                        }
129             
130             
131                        vertex_program_ref BottleVS
132                        {       
133                                        param_named_auto worldViewProj worldviewproj_matrix
134                                param_named_auto world world_matrix
135                                param_named_auto worldIT inverse_transpose_world_matrix
136                        }
137                        fragment_program_ref BottlePS
138                        {
139                                param_named_auto cameraPos camera_position
140                                param_named_auto lightPosition light_position 0
141                                param_named color float3 0.2 0.65 0.2
142                        }
143                               
144                        //Cube map for reflections and refractions     
145                        texture_unit
146                        {
147                        cubic_texture cubemap.jpg combinedUVW
148                        tex_address_mode clamp
149                        colour_op replace
150                        }
151
152                        //Cube map of distances
153                        texture_unit
154                        {
155                        cubic_texture cubemap.jpg combinedUVW
156                        tex_address_mode clamp
157                        colour_op replace
158                        }
159
160
161                       
162                }
163        }
164}
165
166
167material BottlePhotonMap
168{
169   technique
170   {
171
172        pass
173      {
174                 vertex_program_ref BottleVS
175         {       
176            param_named_auto worldViewProj worldviewproj_matrix
177            param_named_auto world world_matrix
178                        param_named_auto worldIT inverse_transpose_world_matrix   
179         }
180                 fragment_program_ref  BottlePhotonMapPS
181        {
182                        param_named_auto cameraPos camera_position
183                        param_named lastCenter float3 0 0 0
184                       
185         }
186         
187         //Cube map for reflections and refractions     
188                texture_unit
189                {
190                        cubic_texture
191                        filtering none
192                        //tex_address_mode clamp                       
193                }       
194
195       }
196    }
197}
198
199material Bottle2PhotonMap
200{
201   technique
202   {
203
204        pass
205      {
206                 vertex_program_ref BottleVS
207         {       
208            param_named_auto worldViewProj worldviewproj_matrix
209            param_named_auto world world_matrix
210                        param_named_auto worldIT inverse_transpose_world_matrix   
211         }
212                 fragment_program_ref  BottlePhotonMapPS
213        {
214                        param_named_auto cameraPos camera_position
215                        param_named lastCenter float3 0 0 0
216                       
217         }
218         
219         //Cube map for reflections and refractions     
220                texture_unit
221                {
222                        cubic_texture
223                        filtering none
224                        //tex_address_mode clamp                       
225                }       
226
227       }
228    }
229}
230
231material BottleCauMap
232{
233   technique
234   {
235        pass
236     
237                cull_hardware none
238                cull_software none
239                lighting off
240                scene_blend add
241                scene_blend src_alpha one
242                depth_write off
243                point_sprites on
244
245                vertex_program_ref GameTools/CauVS
246         {       
247            param_named_auto worldViewProj worldviewproj_matrix
248            param_named_auto worldView worldview_matrix
249                        param_named_auto Proj projection_matrix
250                        param_named_auto resolution viewport_width
251                        param_named CauSpriteSize float 11.0       
252         }
253                fragment_program_ref  GameTools/CauPS
254        {
255                        param_named CauSpriteIntens float 0.11
256                        param_named color float3 0.65 0.4 0.2
257                 }
258         
259            texture_unit
260                {
261                        vertex_texture true
262                        texture flare.png
263                }
264                texture_unit
265                {
266                        texture PowerOfPhotonHitTexel.dds
267                }
268
269       }
270    }
271}
272
273material Bottle2CauMap
274{
275   technique
276   {
277        pass
278     
279                cull_hardware none
280                cull_software none
281                lighting off
282                scene_blend add
283                scene_blend src_alpha one
284                depth_write off
285                point_sprites on
286
287                vertex_program_ref GameTools/CauVS
288         {       
289            param_named_auto worldViewProj worldviewproj_matrix
290            param_named_auto worldView worldview_matrix
291                        param_named_auto Proj projection_matrix
292                        param_named_auto resolution viewport_width
293                        param_named CauSpriteSize float 11.0       
294         }
295                fragment_program_ref  GameTools/CauPS
296        {
297                        param_named CauSpriteIntens float 0.10
298                        param_named color float3 0.2 0.65 0.2
299                 }
300         
301            texture_unit
302                {
303                        vertex_texture true
304                        texture flare.png
305                }
306                texture_unit
307                {
308                        texture PowerOfPhotonHitTexel.dds
309                }
310
311       }
312    }
313}
314
Note: See TracBrowser for help on using the repository browser.