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

Revision 1049, 11.0 KB checked in by szirmay, 18 years ago (diff)
Line 
1
2vertex_program LocalizedVS hlsl
3{
4        source CarReflections.hlsl
5        entry_point LocalizedVS
6        target vs_2_0
7}
8
9fragment_program MetallicReflector hlsl
10{
11        source CarReflections.hlsl
12        entry_point LocalizedMetalPS
13        target ps_3_0
14}
15
16material body1
17{
18        receive_shadows off
19        technique
20        {
21                pass
22                {
23                       
24                        IllumTechniques
25                        {
26                                RenderTechnique ColorCubeMap
27                                {
28                                        update_interval         1
29                                        distance_calc false
30                                        face_angle_calc false
31                                        update_all_face         false
32                                }
33                                RenderTechnique DistanceCubeMap
34                                {
35                                        update_interval         1
36                                        distance_calc false
37                                        face_angle_calc false
38                                        update_all_face         false           
39                                }
40                               
41                       
42                        }
43                        vertex_program_ref LocalizedVS
44                        {       
45                        param_named_auto worldViewProj worldviewproj_matrix
46                        param_named_auto world world_matrix
47                                param_named_auto worldIT inverse_transpose_world_matrix
48                   
49                        }
50                        fragment_program_ref MetallicReflector
51                        {
52                                param_named_auto cameraPos camera_position
53                                param_named F0 float3 1.0 0.8 0.7
54                                param_named phongColor float3 0.5 0.0 0.0
55                                param_named_auto lightPosition light_position 0
56                                param_named lastCenter float3 0 0 0
57                                param_named reflectivity float 0.16     
58                                //param_named reflectivity float 1     
59                        }
60                       
61                        //Cube map for reflections and refractions     
62                        texture_unit
63                        {
64                                cubic_texture cubemap.jpg combinedUVW
65                                tex_address_mode clamp
66                                colour_op replace
67                        }
68
69                        //Cube map of distances
70                        texture_unit
71                        {
72                                cubic_texture cubemap.jpg combinedUVW
73                                tex_address_mode clamp
74                                colour_op replace
75                        }               
76                }
77        }
78}
79material windscreen1
80{
81        receive_shadows off
82        technique
83        {
84                pass
85                {                       
86                        IllumTechniques
87                        {
88                                RenderTechnique ColorCubeMap
89                                {
90                                        update_interval         1
91                                        distance_calc false
92                                        face_angle_calc false
93                                        update_all_face         false
94                                }
95                                RenderTechnique DistanceCubeMap
96                                {
97                                        update_interval         1
98                                        distance_calc false
99                                        face_angle_calc false
100                                        update_all_face         false           
101                                }
102                                //RenderTechnique CausticCaster
103                                //{
104                                //      update_all_face         false
105                                //      photonmap_resolution    128
106                                //}
107                               
108                       
109                        }
110                        vertex_program_ref LocalizedVS
111                        {       
112                        param_named_auto worldViewProj worldviewproj_matrix
113                        param_named_auto world world_matrix
114                                param_named_auto worldIT inverse_transpose_world_matrix
115                   
116                        }
117                        fragment_program_ref MetallicReflector
118                        {
119                                param_named_auto cameraPos camera_position
120                                param_named F0 float3 1.0 1.0 1.0
121                                param_named phongColor float3 0.02 0.01 0.03
122                                param_named_auto lightPosition light_position 0
123                                param_named lastCenter float3 0 0 0
124                                param_named reflectivity float 0.15     
125                        }
126                       
127                        //Cube map for reflections and refractions     
128                        texture_unit
129                        {
130                                cubic_texture cubemap.jpg combinedUVW
131                                tex_address_mode clamp
132                                colour_op replace
133                        }
134
135                        //Cube map of distances
136                        texture_unit
137                        {
138                                cubic_texture cubemap.jpg combinedUVW
139                                tex_address_mode clamp
140                                colour_op replace
141                        }               
142                }
143        }
144}
145
146vertex_program DiffuseVS hlsl
147{
148        source DiffuseBump.hlsl
149        entry_point DiffuseVS
150        target vs_2_0
151}
152
153fragment_program DiffusePS hlsl
154{
155        source DiffuseBump.hlsl
156        entry_point DiffusePS
157        target ps_3_0
158}
159
160material canvas1
161{
162        receive_shadows off
163        technique
164        {
165                pass
166                {                       
167                        IllumTechniques
168                        {
169                                RenderTechnique ReducedColorCubeMap
170                                {
171                                        resolution              256
172                                        reduced_resolution      8
173                                       
174                                        update_interval         1
175                                        texture_unit_id         0
176                                        distance_calc true 2.0
177                                        face_angle_calc true 2.0
178                                        update_all_face         false
179                                }
180                                RenderTechnique DistanceCubeMap
181                                {
182                                        update_interval         3
183                                        texture_unit_id         1
184                                        distance_calc false
185                                        face_angle_calc false
186                                        update_all_face         false
187                                }               
188                               
189                        }
190             
191                        vertex_program_ref DiffuseVS
192                        {       
193                                param_named_auto worldViewProj worldviewproj_matrix
194                        param_named_auto world world_matrix
195                                 param_named_auto world_IT inverse_transpose_world_matrix       
196                        }
197                                               
198                        fragment_program_ref    DiffusePS
199                        {
200                                param_named_auto cameraPos camera_position
201                                param_named REDUCED_CUBEMAP_SIZE int 8
202                                param_named lastCenter float3 0 0 0     
203                                param_named_auto world_IT inverse_transpose_world_matrix
204                                param_named_auto lightPosition light_position 0                                 
205                        }
206                       
207                       
208                       
209                       
210                        //Cube map for reflections and refractions     
211                        texture_unit
212                        {
213                                cubic_texture
214                                tex_address_mode clamp
215                                colour_op replace
216                        }
217
218                        //Cube map of distances
219                        texture_unit
220                        {
221                        cubic_texture
222                        tex_address_mode clamp
223                        colour_op replace
224                        }
225                       
226                        texture_unit
227                        {
228                          texture canvas.tga
229                        }
230                       
231                        texture_unit
232                        {
233                          texture canvasnormal.dds
234                        }
235
236               
237                }
238        }
239}
240material lambert3
241{
242        receive_shadows off
243        technique
244        {
245                pass
246                {
247                        //IllumTechniques
248                        //{
249                        //      RenderTechnique ColorCubeMap
250                        //      {
251                        //              update_interval         1
252                        //              distance_calc false
253                        //              face_angle_calc false
254                        //              update_all_face         false
255                        //      }                       
256                        //
257                        //}
258                       
259                        //Cube map for reflections and refractions     
260                        //texture_unit
261                        //{
262                        //      colour_op modulate
263                        //}
264
265                        ambient 0 0 0 1
266                        diffuse 0 0 0 1
267                        specular 0 0 0 1
268                }
269        }
270}
271material syigetelogumi
272{
273receive_shadows off
274        technique
275        {
276                pass
277                {
278                        ambient 0 0 0 1
279                        diffuse 0 0 0 1
280                        specular 0.5 0.5 0.5 20
281                        emissive 0 0 0
282                }
283        }
284}
285
286fragment_program CarMirrorPS hlsl
287{
288        source CarReflections.hlsl
289        entry_point MirrorPS
290        target ps_3_0
291}
292
293material mirror
294{
295receive_shadows off
296        technique
297        {
298                pass
299                {                       
300                        IllumTechniques
301                        {
302                                RenderTechnique ColorCubeMap
303                                {
304                                        update_interval         1
305                                        distance_calc false
306                                        face_angle_calc false
307                                        update_all_face         false
308                                }
309                                RenderTechnique DistanceCubeMap
310                                {
311                                        update_interval         1
312                                        distance_calc false
313                                        face_angle_calc false
314                                        update_all_face         false           
315                                }
316                               
317                       
318                        }
319                        vertex_program_ref LocalizedVS
320                        {       
321                        param_named_auto worldViewProj worldviewproj_matrix
322                        param_named_auto world world_matrix
323                                param_named_auto worldIT inverse_transpose_world_matrix
324                   
325                        }
326                        fragment_program_ref CarMirrorPS
327                        {
328                                param_named_auto cameraPos camera_position
329                                param_named lastCenter float3 0 0 0
330                        }
331                       
332                        //Cube map for reflections and refractions     
333                        texture_unit
334                        {
335                                cubic_texture
336                                tex_address_mode clamp
337                                colour_op replace
338                        }
339
340                        //Cube map of distances
341                        texture_unit
342                        {
343                                cubic_texture
344                                tex_address_mode clamp
345                                colour_op replace
346                        }               
347                }
348        }
349}
350
351fragment_program LampGlassPS hlsl
352{
353        source CarReflections.hlsl
354        entry_point LampGlassPS
355        target ps_3_0
356}
357
358material elsolampabura
359{
360       
361        //transparency_casts_shadows on
362
363        technique
364        {
365                pass
366                {
367                        IllumTechniques
368                        {
369                                RenderTechnique ColorCubeMap
370                                {
371                                        update_interval         1
372                                        distance_calc false
373                                        face_angle_calc false
374                                        update_all_face         false
375                                }
376                                RenderTechnique DistanceCubeMap
377                                {
378                                        update_interval         1
379                                        distance_calc false
380                                        face_angle_calc false
381                                        update_all_face         false           
382                                }
383                               
384                       
385                        }
386                        vertex_program_ref LocalizedVS
387                        {       
388                          param_named_auto worldViewProj worldviewproj_matrix
389                          param_named_auto world world_matrix
390                          param_named_auto worldIT inverse_transpose_world_matrix
391                   
392                        }
393                        fragment_program_ref LampGlassPS
394                        {
395                                param_named_auto cameraPos camera_position
396                                param_named lastCenter float3 0 0 0
397                                param_named glasColor float4 0.9 0.85 0.95 0.65
398                        }
399                       
400                        //Cube map for reflections and refractions     
401                        texture_unit
402                        {
403                                cubic_texture
404                                tex_address_mode clamp
405                                colour_op replace
406                        }
407
408                        Cube map of distances
409                        texture_unit
410                        {
411                                cubic_texture
412                                tex_address_mode clamp
413                                colour_op replace
414                        }               
415
416                        scene_blend alpha_blend
417                        depth_write off
418
419                        ambient 1 1 1 0.5
420                        diffuse 1 1 1 0.5
421                        specular 0 0 0 0
422                        emissive 0 0 0
423
424                       
425                }
426        }
427}
428material elsolampabelul
429{
430receive_shadows off
431
432        technique
433        {
434                pass
435                {
436                        ambient 0.786016 0.968 0.878464 1
437                        diffuse 0.786016 0.968 0.878464 1
438                        specular 0 0 0 0
439                        emissive 0 0 0
440                }
441        }
442}
443
444material hatsolampa
445{
446receive_shadows off
447transparency_casts_shadows on
448        technique
449        {
450                pass
451                {
452                        IllumTechniques
453                        {
454                                RenderTechnique ColorCubeMap
455                                {
456                                        update_interval         1
457                                        distance_calc false
458                                        face_angle_calc false
459                                        update_all_face         false
460                                }
461                                RenderTechnique DistanceCubeMap
462                                {
463                                        update_interval         1
464                                        distance_calc false
465                                        face_angle_calc false
466                                        update_all_face         false           
467                                }
468                               
469                       
470                        }
471                        vertex_program_ref LocalizedVS
472                        {       
473                        param_named_auto worldViewProj worldviewproj_matrix
474                        param_named_auto world world_matrix
475                                param_named_auto worldIT inverse_transpose_world_matrix
476                   
477                        }
478                        fragment_program_ref LampGlassPS
479                        {
480                                param_named_auto cameraPos camera_position
481                                param_named lastCenter float3 0 0 0
482                                param_named glasColor float4 0.9 0.1 0.0 0.7
483                        }
484                       
485                        //Cube map for reflections and refractions     
486                        texture_unit
487                        {
488                                cubic_texture
489                                tex_address_mode clamp
490                                colour_op replace
491                        }
492
493                        //Cube map of distances
494                        texture_unit
495                        {
496                                cubic_texture
497                                tex_address_mode clamp
498                                colour_op replace
499                        }               
500
501                        //scene_blend alpha_blend
502                        //depth_write off
503                }
504        }
505}
506material hatso_lampa_belso
507{
508receive_shadows off
509
510        technique
511        {
512                pass
513                {
514                        ambient 0.1 0.1 0.1 1
515                        diffuse 1 1 1 1
516                        specular 0 0 0 0
517                        emissive 0.2 0.2 0.2
518
519                        //texture_unit
520                        //{
521                        //      texture lampahatul.jpg
522                        //}
523                }
524        }
525}
526
527material index
528{
529receive_shadows off
530
531        technique
532        {
533                pass
534                {
535                        IllumTechniques
536                        {
537                                RenderTechnique ColorCubeMap
538                                {
539                                        update_interval         1
540                                        distance_calc false
541                                        face_angle_calc false
542                                        update_all_face         false
543                                }
544                                RenderTechnique DistanceCubeMap
545                                {
546                                        update_interval         1
547                                        distance_calc false
548                                        face_angle_calc false
549                                        update_all_face         false           
550                                }
551                               
552                       
553                        }
554                        vertex_program_ref LocalizedVS
555                        {       
556                        param_named_auto worldViewProj worldviewproj_matrix
557                        param_named_auto world world_matrix
558                                param_named_auto worldIT inverse_transpose_world_matrix
559                   
560                        }
561                        fragment_program_ref MetallicReflector
562                        {
563                                param_named_auto cameraPos camera_position
564                                param_named F0 float3 2.0 1.0 0.2
565                                param_named_auto lightPosition light_position 0
566                                param_named lastCenter float3 0 0 0
567                                param_named reflectivity float 0.6     
568                        }
569                       
570                        //Cube map for reflections and refractions     
571                        texture_unit
572                        {
573                                cubic_texture cubemap.jpg combinedUVW
574                                tex_address_mode clamp
575                                colour_op replace
576                        }
577
578                        //Cube map of distances
579                        texture_unit
580                        {
581                                cubic_texture cubemap.jpg combinedUVW
582                                tex_address_mode clamp
583                                colour_op replace
584                        }               
585                }
586        }
587}
588
Note: See TracBrowser for help on using the repository browser.