source: GTP/branches/IllumWPdeliver2008dec/IlluminationWP/demos/OgreGames/SpaceStation/Media/Station/station.material @ 3255

Revision 3255, 10.2 KB checked in by szirmay, 15 years ago (diff)
Line 
1vertex_program GTP/StationDemo/StationBase_VS hlsl
2{
3   source StationBase.hlsl
4   entry_point StationBase_VS
5   target vs_3_0
6}
7
8fragment_program GTP/StationDemo/StationBase_PS hlsl
9{
10   source StationBase.hlsl
11   entry_point StationBase_PS
12   target ps_3_0
13   flow_control prefer
14}
15
16vertex_program GTP/StationDemo/MorphedSphere_VS hlsl
17{
18   source StationBase.hlsl
19   entry_point MorphedSphere_VS
20   target vs_2_0
21}
22               
23material SpaceStation_Base
24{
25        technique main
26        {
27                pass main
28                {
29                        IllumTechniques
30                        {       
31                                RenderTechnique PathMap
32                                {
33                                        new_passes false
34                                        start_tex_id 2
35                                }                               
36                                RenderTechnique DepthShadowReceiver
37                                {
38                                        max_light_count 2
39                                        nearest_from_camera false
40                                        set_light_viewproj true
41                                        set_light_view true
42                                        set_light_farplane true
43                                        bind_to_vertex_shader true
44                                        light_view_param_name LightView
45                                        light_viewproj_param_name LightViewProj
46                                        light_farplane_param_name lightFarPlane
47                                        new_passes false
48                                        start_tex_id 5
49                                }                               
50                        }
51                        vertex_program_ref GTP/StationDemo/StationBase_VS
52                        {
53                          param_named_auto WorldViewProj worldviewproj_matrix 
54                          param_named_auto World world_matrix
55                          param_named_auto WorldI inverse_world_matrix
56                          param_named_auto wCamPos camera_position
57                        }
58                        fragment_program_ref GTP/StationDemo/StationBase_PS
59                        {
60                          param_named_auto wLightPos1 light_position 0
61                          param_named_auto wLightPos2 light_position 1                           
62                          param_named_auto wLightDir1 light_direction 0
63                          param_named_auto wLightDir2 light_direction 1         
64                          param_named_auto lightRange1 light_attenuation 0
65                          param_named_auto lightRange2 light_attenuation 1
66                          param_named_auto lightPower1 light_power 0
67                          param_named_auto lightPower2 light_power 1
68                          param_named_auto lightColor1 light_diffuse_colour 0
69                          param_named_auto lightColor2 light_diffuse_colour 1
70                          param_named specularity float 20
71                          param_named specularColor float4 0.2 0.2 0.2 0.2
72                          param_named causticReceiver float 0
73                        }
74                        texture_unit color
75                        {
76                        }
77                        texture_unit Obscurances
78                        {
79                        }
80                        texture_unit PM_PRM
81                        {
82                        }
83                        texture_unit PM_weightIndex
84                        {
85                        }
86                        texture_unit PM_ClusterWeight
87                        {
88                        }
89                        texture_unit SM1
90                        {
91                        }
92                        texture_unit SM2
93                        {
94                        }
95                       
96                }
97        }
98}
99
100material SpaceStation_ConnectElem : SpaceStation_Base
101{
102        technique main
103        {
104                pass main
105                {
106                        texture_unit color
107                        {
108                                texture cornerUV.jpg
109                        }
110                        texture_unit Obscurances
111                        {
112                                texture cornerO.bmp
113                        }
114                }
115        }
116}
117material SpaceStation_CorridorElem : SpaceStation_Base
118{
119        technique main
120        {
121                pass main
122                {
123                        texture_unit color
124                        {
125                                texture elemUV.jpg
126                        }
127                        texture_unit Obscurances
128                        {
129                                texture elemO.bmp
130                        }
131                }
132        }
133}
134material SpaceStation_HallPipes : SpaceStation_Base
135{
136        technique main
137        {
138                pass main
139                {
140                        texture_unit color
141                        {
142                                texture pipesUV.jpg
143                        }
144                        texture_unit Obscurances
145                        {
146                                texture pipesO.bmp
147                        }
148                }
149        }
150}
151material SpaceStation_Hall : SpaceStation_Base
152{
153        technique main
154        {
155                pass main
156                {
157                        IllumTechniques
158                        {                       
159                                RenderTechnique CausticReceiver
160                                {
161                                        max_caster_count        1
162                                        //bind_distance_map true
163                                        attenuation_var_name causticAttenuationRange
164                                        center_var_name causticCasterCenter
165                                        start_tex_id 7
166                                        new_passes false
167                                }
168                        }
169                        fragment_program_ref
170                        {
171                                param_named causticReceiver float 1
172                        }
173                        texture_unit color
174                        {
175                                texture hallUV.jpg
176                        }
177                        texture_unit Obscurances
178                        {
179                                texture hallO.bmp
180                        }       
181                        texture_unit CauMap
182                        {
183                        }               
184                }
185        }
186}
187material SpaceStation_Room : SpaceStation_Base
188{
189        technique main
190        {
191                pass main
192                {
193                        texture_unit color
194                        {
195                                texture roomUV.jpg
196                        }
197                        texture_unit Obscurances
198                        {
199                                texture roomO.bmp
200                        }
201                }
202        }
203}
204
205material GTP/Station/PhotonMap_HitEnv
206{
207 technique
208 {
209  pass
210  {   
211   vertex_program_ref GTP/StationDemo/MorphedSphere_VS
212   {       
213        param_named_auto WorldViewProj worldviewproj_matrix
214        param_named_auto World world_matrix
215        param_named_auto WorldInv inverse_world_matrix
216        param_named_auto t time
217   }
218   fragment_program_ref GTP/Caustic/PhotonMapHitEnv_PS
219   {
220     param_named_auto cameraPos camera_position
221     param_named lastCenter float3 0 0 0
222     param_named refIndex float 0.65   
223   }
224   //cubemap of distances
225   texture_unit
226   {
227        filtering none
228   }
229  }
230 }
231}
232
233material GTP/Station/CauCube_PointSprite
234{
235 technique
236 {
237  pass
238  {
239   cull_hardware none
240   scene_blend src_alpha one
241   depth_check off
242   point_sprites on
243   vertex_program_ref GTP/Caustic/CauCube_PointSprite_VS
244   {
245     param_named_auto WorldView     worldview_matrix
246     param_named_auto Proj          projection_matrix
247     param_named CauSpriteSize      float 20
248   }
249   fragment_program_ref GTP/Caustic/CauCube_PointSprite_PS
250   {
251     param_named CausticColor float4          1 1 1 0.15
252   }
253   texture_unit
254   {
255     vertex_texture true         
256   }
257   texture_unit
258   {
259     texture PowerOfPhotonHitTexel.dds
260   }
261  }
262 }
263}
264
265material GTP/Station/CauCube_Point
266{
267 technique
268 {
269  pass
270  {
271   cull_hardware none
272   scene_blend src_alpha one
273   depth_check off
274   vertex_program_ref GTP/Caustic/CauCube_PointSprite_VS
275   {
276     param_named_auto WorldView     worldview_matrix
277     param_named_auto Proj          projection_matrix
278     param_named CauSpriteSize      float 20
279   }
280   fragment_program_ref GTP/Caustic/CauCube_Point_PS
281   {
282     param_named CausticColor float4          1 1 1 0.09
283     param_named_auto targetResolution viewport_width
284   }
285   texture_unit
286   {
287     vertex_texture true         
288   }
289   texture_unit
290   {
291     texture PowerOfPhotonHitTexel.dds
292   }
293  }
294 }
295}
296
297material GTP/Station/CauCube_Triangles
298{
299 technique
300 {
301  pass
302  {
303   cull_hardware none
304   scene_blend one one
305   scene_blend_alpha one zero
306   depth_write off
307   vertex_program_ref GTP/Caustic/CauCube_Triangles_VS
308   {
309     param_named_auto WorldView      worldview_matrix
310     param_named_auto Proj           projection_matrix
311     param_named PhotonMapResolution float 64
312     param_named WorldSize float 0.1
313   }
314   fragment_program_ref GTP/Caustic/CauCube_Triangles_PS
315   {
316     param_named CausticColor float4 0.7 0.7 0.5 1
317     
318   }
319   texture_unit
320   {
321     vertex_texture true         
322   }
323  }
324 }
325}
326
327vertex_program GTP/StationDemo/MorphedSphereSM_VS hlsl
328{
329   source StationBase.hlsl
330   entry_point MorphedSphereSM_VS
331   target vs_2_0
332}
333
334fragment_program GTP/StationDemo/MorphedSphereSM_PS hlsl
335{
336   source StationBase.hlsl
337   entry_point MorphedSphereSM_PS
338   target ps_2_0
339}
340
341
342material SpaceStation_CausticCaster_SM
343{
344        technique
345        {
346                pass
347                {
348                        vertex_program_ref GTP/StationDemo/MorphedSphereSM_VS
349                        { 
350                        param_named_auto WorldViewProj worldviewproj_matrix     
351                        param_named_auto WorldView     worldview_matrix
352                        param_named_auto t time
353                        }
354                        fragment_program_ref GTP/StationDemo/MorphedSphereSM_PS
355                        {       
356                        param_named_auto farPlane far_clip_distance
357                        }         
358                }
359        }
360}
361
362vertex_program GTP/StationDemo/MorphedSphereCDepth_VS hlsl
363{
364   source StationBase.hlsl
365   entry_point MorphedSphereCDepth_VS
366   target vs_2_0
367}
368material SpaceStation_CausticCaster_CDepth
369{
370        technique
371        {
372                pass
373                {
374                        vertex_program_ref GTP/StationDemo/MorphedSphereCDepth_VS
375                   { 
376                     param_named_auto WorldViewProj worldviewproj_matrix
377                     param_named_auto WorldView     worldview_matrix
378                     param_named_auto t time   
379                   }
380                   fragment_program_ref GTP/Basic/CDepth_PS
381                   {
382                     param_named_auto farplane far_clip_distance
383                   }
384                }
385        }
386}
387
388material SpaceStation_CausticCaster
389{
390   technique
391   {   
392      pass
393      {
394                 IllumTechniques
395                 {
396                        RenderTechnique Triggers
397                        {
398                                        ILLUM_TRIGGER_SM_SPOT SpaceStation_CausticCaster_SM
399                                        ILLUM_TRIGGER_CAMERADEPTH SpaceStation_CausticCaster_CDepth
400                        }                       
401                        RenderTechnique ColorCubeMap
402                        {
403                                update_interval         1
404                                resolution 256
405                                update_all_face true                                                                   
406                        }
407                        RenderTechnique DistanceCubeMap
408                        {
409                                resolution 512
410                                update_interval         0
411                                start_frame 0
412                                update_all_face true                                                                           
413                        }
414                        RenderTechnique CausticCaster
415                        {
416                                attenuation     5.5
417                                update_interval 1
418                                update_all_face true
419                                photonmap_resolution 64
420                                caustic_cubemap_resolution 256
421                                photon_map_material     GTP/Station/PhotonMap_HitEnv
422                                caustic_map_material    GTP/Station/CauCube_Point
423                                //caustic_map_material  GTP/Station/CauCube_Triangles
424                                //use_triangles true
425                                //blur_caustic_cubemap true                             
426                        }
427                       
428                 }     
429         vertex_program_ref GTP/StationDemo/MorphedSphere_VS
430         {       
431            param_named_auto WorldViewProj worldviewproj_matrix
432            param_named_auto World world_matrix
433            param_named_auto WorldInv inverse_world_matrix
434            param_named_auto t time
435         }
436         fragment_program_ref GTP/EnvMap/Localized_Refraction_PS
437         {
438            param_named_auto cameraPos camera_position
439            param_named lastCenter float3 0 0 0
440            param_named sFresnel float 0.1
441            param_named sRefraction float 0.65
442
443             }         
444             //Cube map for reflections and refractions
445             texture_unit
446             {
447           
448             }
449             //Cube map of distances
450             texture_unit
451             {
452                filtering none
453             }
454          }
455   }
456}
457
458
459material Station/redbutton
460{
461        technique
462        {
463                pass
464                {
465                        ambient 0 0 0 1
466                        diffuse 1 0.2 0.2 1
467                        specular 0 0 0 1
468                        emissive 1 0.1 0.1 1
469                }
470        }
471}
472
473material Station/bluebutton
474{
475        technique
476        {
477                pass
478                {
479                        ambient 0 0 0 1
480                        diffuse 0.2 0.2 1 1
481                        specular 0 0 0 1
482                        emissive 0.1 0.1 1 1
483                }
484        }
485}
486
487material station_equipt
488{
489        technique
490        {
491                pass
492                {
493                        ambient 0 0 0 1
494                        diffuse 0.07444 0.07444 0.07444 1
495                        specular 0.80166 0.80166 0.80166 62.744
496                        emissive 0 0 0
497                }
498        }
499}
500
501material Station_lamp
502{
503        technique
504        {
505                pass
506                {
507                        vertex_program_ref GTP/Basic/PlainTex_VS
508                   { 
509                     param_named_auto WorldViewProj worldviewproj_matrix     
510                   }
511                   fragment_program_ref GTP/Basic/PlainTex2DColored_PS
512                   {   
513                           param_named color float4 20 20 20 20
514                   }
515                        texture_unit
516                {
517                 texture lamp.bmp
518                }
519                }
520        }
521}
522
523material tation_room_lamp
524{
525        technique
526        {
527                pass
528                {
529                        vertex_program_ref GTP/Basic/PlainTex_VS
530                   { 
531                     param_named_auto WorldViewProj worldviewproj_matrix     
532                   }
533                   fragment_program_ref GTP/Basic/PlainTex2DColored_PS
534                   {   
535                           param_named color float4 10 10 10 10
536                   }   
537                   texture_unit
538                   {
539                           texture lamp.bmp
540                   }
541
542                }               
543        }
544}
545
546
547
548
549                       
550                       
Note: See TracBrowser for help on using the repository browser.