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

Revision 1897, 5.7 KB checked in by szirmay, 18 years ago (diff)
RevLine 
[1724]1vertex_program DefaultVS hlsl
2{
3        source MetalTeapot.hlsl
4        entry_point DefaultVS
5        target vs_2_0
6}
[1720]7
[1724]8fragment_program Metal1BouncePS hlsl
9{
10        source MetalTeapot.hlsl
11        entry_point Metal1BouncePS
12        target ps_3_0
13}
14
[1720]15material MetalTeapot
16{
17   technique
18   {
19      pass
20      {
21                IllumTechniques
22                {
23                        RenderTechnique ColorCubeMap
24                        {
25                                update_interval         0
26                                distance_calc false
[1724]27                                face_angle_calc false                                   
[1720]28                        }
29                        RenderTechnique DistanceCubeMap
30                        {
31                                update_interval         0
32                                distance_calc true false
33                                face_angle_calc true false             
34                        }
35               
36                 }
[1724]37                 vertex_program_ref DefaultVS
[1720]38         {       
39            param_named_auto worldViewProj worldviewproj_matrix
40            param_named_auto world world_matrix
[1724]41            param_named_auto worldview worldview_matrix
42            param_named_auto worldI inverse_world_matrix           
[1720]43         }
[1724]44                 fragment_program_ref   Metal1BouncePS
[1720]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
[1724]49                        param_named F0 float3 0.95 0.63 0.54                   
[1720]50                }
51               
52                //Cube map for reflections and refractions     
53                texture_unit
54                {
[1724]55                       
[1720]56                }
57
58                //Cube map of distances
59                texture_unit
60                {
[1724]61                       
[1720]62                }
63          }
64    }
[1724]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    {
[1862]91                param_named refIndex float 200         
[1724]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    {
[1862]113                param_named refIndex float 200 
[1724]114        }
115  }
116 }
117}
118
[1882]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
[1885]133    scene_blend max
134    depth_test off
[1882]135   
136        vertex_program_ref DefaultVS
137    {       
138        param_named_auto worldViewProj worldviewproj_matrix
139            param_named_auto world world_matrix
140            param_named_auto worldview worldview_matrix
141        param_named_auto worldI inverse_world_matrix   
142    }
143    fragment_program_ref DistanceMinMaxPS
144    {                   
145        }
146  }
147 }
148}
149
150material DistanceMinMaxCCW
151{
152 technique
153 {
154  pass
155  {
156    cull_hardware anticlockwise
[1885]157    scene_blend max
158    depth_test off
[1882]159   
160        vertex_program_ref DefaultVS
161    {       
162        param_named_auto worldViewProj worldviewproj_matrix
163            param_named_auto world world_matrix
164            param_named_auto worldview worldview_matrix
165        param_named_auto worldI inverse_world_matrix   
166    }
167    fragment_program_ref DistanceMinMaxPS
168    {           
169        }
170  }
171 }
172}
173
[1724]174fragment_program MetalMultipleBouncePS hlsl
175{
[1859]176        //source MetalTeapot.hlsl
177        //entry_point MetalMultipleBouncePS
178        source MetalTeapotNew.hlsl
179    entry_point mainPS
180
[1724]181        target ps_3_0
[1735]182        flow_control prefer
[1724]183}
184
185material MetalTeapotMultipleBounce
186{
187   technique
188   {
189      pass
190      {
[1860]191        //cull_hardware none
[1724]192                IllumTechniques
193                {
194                        RenderTechnique ColorCubeMap
195                        {
[1735]196                                resolution 1024
197                                update_interval         0
[1724]198                                distance_calc false
[1730]199                                face_angle_calc false
200                                update_all_face true                                   
[1724]201                        }
202                        RenderTechnique DistanceCubeMap
203                        {
[1735]204                                resolution 1024
205                                update_interval         0
[1897]206                                get_minmax true
207                                min_var_name min
[1735]208                                distance_calc false
209                                face_angle_calc false
[1730]210                                update_all_face true
[1724]211                        }
212                        RenderTechnique ColorCubeMap
213                        {
[1735]214                                resolution 1024
[1724]215                                layer 1
216                                texture_unit_id 2
[1885]217                                get_minmax true
218                                min_var_name min1
[1735]219                                update_interval         0
220                                distance_calc false
221                                face_angle_calc false
[1730]222                                update_all_face true
[1724]223                                render_env false
224                                render_self true
225                                self_material NormalDistanceCCW
226                        }
227                        RenderTechnique ColorCubeMap
228                        {
[1735]229                                resolution 1024
[1724]230                                layer 2
231                                texture_unit_id 3
[1885]232                                get_minmax true
233                                min_var_name min2
[1735]234                                update_interval         0
235                                distance_calc false
236                                face_angle_calc false
[1730]237                                update_all_face true
[1724]238                                render_env false
239                                render_self true
240                                self_material NormalDistanceCW
[1885]241                        }               
[1724]242                 }
243                 vertex_program_ref DefaultVS
244         {       
245            param_named_auto worldViewProj worldviewproj_matrix
246            param_named_auto world world_matrix
247            param_named_auto worldview worldview_matrix
248            param_named_auto worldI inverse_world_matrix
249           
250         }
251                 fragment_program_ref   MetalMultipleBouncePS
252         {
253                        param_named_auto cameraPos camera_position
254                        //param_named n float3 0.21 0.96 1.17
255                        //param_named k float3 4.16 2.57 2.32
[1854]256                        param_named F0 float3 0.95 0.95 0.95
[1860]257                        param_named SingleBounce float 0.0
[1879]258                        param_named refIndex float 0.6667                       
[1724]259                }
260               
261                //Cube map of environment
262                texture_unit
263                {
[1735]264                        //filtering none
[1724]265                }
266                //Cube map of environment distances
267                texture_unit
268                {
[1735]269                        filtering none
[1724]270                }
271               
272                //Cube map of reflective object's normals and distances CCW
273                texture_unit
274                {
[1735]275                        filtering none
[1724]276                }
277               
278                //Cube map of reflective object's normals and distances CW
279                texture_unit
280                {
[1735]281                        filtering none
[1724]282                }
283          }
284    }
[1720]285}
Note: See TracBrowser for help on using the repository browser.