source: GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/MetalTeapot.material @ 1959

Revision 1959, 8.8 KB checked in by szirmay, 17 years ago (diff)
Line 
1vertex_program DefaultVS hlsl
2{
3        source MetalTeapot.hlsl
4        entry_point DefaultVS
5        target vs_2_0
6}
7
8fragment_program Metal1BouncePS hlsl
9{
10        source MetalTeapot.hlsl
11        entry_point Metal1BouncePS
12        target ps_3_0
13}
14
15material MetalTeapot
16{
17   technique
18   {
19      pass
20      {
21                IllumTechniques
22                {
23                        RenderTechnique ColorCubeMap
24                        {
25                                update_interval         0
26                                distance_calc false
27                                face_angle_calc false                                   
28                        }
29                        RenderTechnique DistanceCubeMap
30                        {
31                                update_interval         0
32                                distance_calc true false
33                                face_angle_calc true false             
34                        }
35               
36                 }
37                 vertex_program_ref DefaultVS
38         {       
39            param_named_auto worldViewProj worldviewproj_matrix
40            param_named_auto world world_matrix
41            param_named_auto worldview worldview_matrix
42            param_named_auto worldI inverse_world_matrix           
43         }
44                 fragment_program_ref   Metal1BouncePS
45         {
46                        param_named_auto cameraPos camera_position
47                        //param_named n float3 0.21 0.96 1.17
48                        //param_named k float3 4.16 2.57 2.32
49                        param_named F0 float3 0.95 0.63 0.54                   
50                }
51               
52                //Cube map for reflections and refractions     
53                texture_unit
54                {
55                       
56                }
57
58                //Cube map of distances
59                texture_unit
60                {
61                       
62                }
63          }
64    }
65}
66
67fragment_program NormalDistancePS hlsl
68{
69        source MetalTeapot.hlsl
70        entry_point NormalDistancePS
71        target ps_3_0
72}
73
74material NormalDistanceCW
75{
76 technique
77 {
78  pass
79  {
80    cull_hardware clockwise
81   
82        vertex_program_ref DefaultVS
83    {       
84        param_named_auto worldViewProj worldviewproj_matrix
85            param_named_auto world world_matrix
86            param_named_auto worldview worldview_matrix
87        param_named_auto worldI inverse_world_matrix   
88    }
89    fragment_program_ref NormalDistancePS
90    {
91                param_named refIndex float 200         
92        }
93  }
94 }
95}
96
97material NormalDistanceCCW
98{
99 technique
100 {
101  pass
102  {
103    cull_hardware anticlockwise
104        vertex_program_ref DefaultVS
105    {       
106        param_named_auto worldViewProj worldviewproj_matrix
107            param_named_auto world world_matrix
108            param_named_auto worldview worldview_matrix
109        param_named_auto worldI inverse_world_matrix   
110    }
111    fragment_program_ref NormalDistancePS
112    {
113                param_named refIndex float 200 
114        }
115  }
116 }
117}
118
119fragment_program DistanceMinMaxPS hlsl
120{
121        source MetalTeapot.hlsl
122        entry_point DistanceMinMaxPS
123        target ps_3_0
124}
125
126material DistanceMinMaxCW
127{
128 technique
129 {
130  pass
131  {
132    cull_hardware clockwise
133    scene_blend_op max
134    depth_test off
135    polygon_mode points
136   
137        vertex_program_ref DefaultVS
138    {       
139        param_named_auto worldViewProj worldviewproj_matrix
140            param_named_auto world world_matrix
141            param_named_auto worldview worldview_matrix
142        param_named_auto worldI inverse_world_matrix   
143    }
144    fragment_program_ref DistanceMinMaxPS
145    {                   
146        }
147  }
148 }
149}
150
151material DistanceMinMaxCCW
152{
153 technique
154 {
155  pass
156  {
157    cull_hardware anticlockwise
158    scene_blend_op max
159    depth_test off
160    polygon_mode points
161       
162        vertex_program_ref DefaultVS
163    {       
164        param_named_auto worldViewProj worldviewproj_matrix
165            param_named_auto world world_matrix
166            param_named_auto worldview worldview_matrix
167        param_named_auto worldI inverse_world_matrix   
168    }
169    fragment_program_ref DistanceMinMaxPS
170    {           
171        }
172  }
173 }
174}
175
176fragment_program MetalMultipleBouncePS hlsl
177{
178        //source MetalTeapot.hlsl
179        //entry_point MetalMultipleBouncePS
180        source MetalTeapotNew.hlsl
181    entry_point mainPS
182
183        target ps_3_0
184        flow_control prefer
185}
186
187material MetalTeapotMultipleBounce
188{
189   technique
190   {
191      pass
192      {
193        //cull_hardware none
194                IllumTechniques
195                {
196                        RenderTechnique ColorCubeMap
197                        {
198                                resolution 1024
199                                update_interval         0
200                                distance_calc false
201                                face_angle_calc false
202                                update_all_face true                                   
203                        }
204                        RenderTechnique DistanceCubeMap
205                        {
206                                resolution 1024
207                                update_interval         0
208                                distance_calc false
209                                face_angle_calc false
210                                update_all_face true
211                        }
212                        RenderTechnique ColorCubeMap
213                        {
214                                resolution 1024
215                                layer 1
216                                texture_unit_id 2
217                                update_interval         0
218                                distance_calc false
219                                face_angle_calc false
220                                update_all_face true
221                                render_env false
222                                render_self true
223                                self_material NormalDistanceCCW
224                        }
225                        RenderTechnique ColorCubeMap
226                        {
227                                resolution 1024
228                                layer 2
229                                texture_unit_id 3
230                                update_interval         0
231                                distance_calc false
232                                face_angle_calc false
233                                update_all_face true
234                                render_env false
235                                render_self true
236                                self_material NormalDistanceCW
237                        }
238                        RenderTechnique ColorCubeMap
239                        {
240                                resolution 1
241                                layer 3                         
242                                attach_to_texture_unit false
243                                get_minmax true
244                                max_var_name minmax
245                                update_interval         0
246                                distance_calc false
247                                face_angle_calc false
248                                update_all_face true
249                                render_env true
250                                render_self false
251                                env_material DistanceMinMaxCW
252                        }
253                        RenderTechnique ColorCubeMap
254                        {
255                                resolution 1
256                                layer 4
257                                attach_to_texture_unit false
258                                get_minmax true
259                                max_var_name minmax1
260                                update_interval         0
261                                distance_calc false
262                                face_angle_calc false
263                                update_all_face true
264                                render_env false
265                                render_self true
266                                self_material DistanceMinMaxCCW
267                        }
268                        RenderTechnique ColorCubeMap
269                        {
270                                resolution 1
271                                layer 5
272                                attach_to_texture_unit false
273                                get_minmax true
274                                max_var_name minmax2
275                                update_interval         0
276                                distance_calc false
277                                face_angle_calc false
278                                update_all_face true
279                                render_env false
280                                render_self true
281                                self_material DistanceMinMaxCW
282                        }                       
283                 }
284                 vertex_program_ref DefaultVS
285         {       
286            param_named_auto worldViewProj worldviewproj_matrix
287            param_named_auto world world_matrix
288            param_named_auto worldview worldview_matrix
289            param_named_auto worldI inverse_world_matrix
290           
291         }
292                 fragment_program_ref   MetalMultipleBouncePS
293         {
294                        param_named_auto cameraPos camera_position
295                        //param_named n float3 0.21 0.96 1.17
296                        //param_named k float3 4.16 2.57 2.32
297                        param_named F0 float3 0.95 0.95 0.95
298                        param_named SingleBounce float 0.0
299                        param_named refIndex float 0.6667                       
300                }
301               
302                //Cube map of environment
303                texture_unit
304                {
305                        //filtering none
306                }
307                //Cube map of environment distances
308                texture_unit
309                {
310                        filtering none
311                }
312               
313                //Cube map of reflective object's normals and distances CCW
314                texture_unit
315                {
316                        filtering none
317                }               
318                //Cube map of reflective object's normals and distances CW
319                texture_unit
320                {
321                        filtering none
322                }
323          }
324    }
325}
326
327
328
329
330material MetalTeapotMultipleBounce_0
331{
332   technique
333   {
334      pass
335      {
336        //cull_hardware none
337                IllumTechniques
338                {
339                        RenderTechnique ColorCubeMap
340                        {
341                                resolution 1024
342                                update_interval         0
343                                distance_calc false
344                                face_angle_calc false
345                                update_all_face true
346                                                               
347                        }
348                        RenderTechnique DistanceCubeMap
349                        {
350                                resolution 1024
351                                update_interval         0
352                                distance_calc false
353                                face_angle_calc false
354                                update_all_face true
355                                get_minmax true
356                                min_var_name min
357                                max_var_name max
358                        }
359                        RenderTechnique ColorCubeMap
360                        {
361                                resolution 1024
362                                layer 1
363                                texture_unit_id 2
364                                update_interval         0
365                                distance_calc false
366                                face_angle_calc false
367                                update_all_face true
368                                render_env false
369                                render_self true
370                                self_material NormalDistanceCCW
371                                get_minmax true
372                                min_var_name min1
373                                max_var_name max1
374                        }
375                        RenderTechnique ColorCubeMap
376                        {
377                                resolution 1024
378                                layer 2
379                                texture_unit_id 3
380                                update_interval         0
381                                distance_calc false
382                                face_angle_calc false
383                                update_all_face true
384                                render_env false
385                                render_self true
386                                self_material NormalDistanceCW
387                                get_minmax true
388                                min_var_name min2
389                                max_var_name max2
390                        }                               
391                 }
392                 vertex_program_ref DefaultVS
393         {       
394            param_named_auto worldViewProj worldviewproj_matrix
395            param_named_auto world world_matrix
396            param_named_auto worldview worldview_matrix
397            param_named_auto worldI inverse_world_matrix
398           
399         }
400                 fragment_program_ref   MetalMultipleBouncePS
401         {
402                        param_named_auto cameraPos camera_position
403                        //param_named n float3 0.21 0.96 1.17
404                        //param_named k float3 4.16 2.57 2.32
405                        param_named F0 float3 0.95 0.95 0.95
406                        param_named SingleBounce float 0.0
407                        param_named refIndex float 0.6667                       
408                }
409               
410                //Cube map of environment
411                texture_unit
412                {
413                        //filtering none
414                }
415                //Cube map of environment distances
416                texture_unit
417                {
418                        filtering none
419                }
420               
421                //Cube map of reflective object's normals and distances CCW
422                texture_unit
423                {
424                        filtering none
425                }               
426                //Cube map of reflective object's normals and distances CW
427                texture_unit
428                {
429                        filtering none
430                }
431          }
432    }
433}
Note: See TracBrowser for help on using the repository browser.