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

Revision 1735, 4.3 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    {
91                               
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                               
114        }
115  }
116 }
117}
118
119fragment_program MetalMultipleBouncePS hlsl
120{
121        source MetalTeapot.hlsl
122        entry_point MetalMultipleBouncePS
123        target ps_3_0
[1735]124        flow_control prefer
[1724]125}
126
127material MetalTeapotMultipleBounce
128{
129   technique
130   {
131      pass
132      {
133                IllumTechniques
134                {
135                        RenderTechnique ColorCubeMap
136                        {
[1735]137                                resolution 1024
138                                update_interval         0
[1724]139                                distance_calc false
[1730]140                                face_angle_calc false
141                                update_all_face true                                   
[1724]142                        }
143                        RenderTechnique DistanceCubeMap
144                        {
[1735]145                                resolution 1024
146                                update_interval         0
147                                distance_calc false
148                                face_angle_calc false
[1730]149                                update_all_face true
[1724]150                        }
151                        RenderTechnique ColorCubeMap
152                        {
[1735]153                                resolution 1024
[1724]154                                layer 1
155                                texture_unit_id 2
[1735]156                                update_interval         0
157                                distance_calc false
158                                face_angle_calc false
[1730]159                                update_all_face true
[1724]160                                render_env false
161                                render_self true
162                                self_material NormalDistanceCCW
163                        }
164                        RenderTechnique ColorCubeMap
165                        {
[1735]166                                resolution 1024
[1724]167                                layer 2
168                                texture_unit_id 3
[1735]169                                update_interval         0
170                                distance_calc false
171                                face_angle_calc false
[1730]172                                update_all_face true
[1724]173                                render_env false
174                                render_self true
175                                self_material NormalDistanceCW
176                        }
177               
178                 }
179                 vertex_program_ref DefaultVS
180         {       
181            param_named_auto worldViewProj worldviewproj_matrix
182            param_named_auto world world_matrix
183            param_named_auto worldview worldview_matrix
184            param_named_auto worldI inverse_world_matrix
185           
186         }
187                 fragment_program_ref   MetalMultipleBouncePS
188         {
189                        param_named_auto cameraPos camera_position
190                        //param_named n float3 0.21 0.96 1.17
191                        //param_named k float3 4.16 2.57 2.32
192                        param_named F0 float3 0.95 0.95 0.95                   
193                }
194               
195                //Cube map of environment
196                texture_unit
197                {
[1735]198                        //filtering none
[1724]199                }
200                //Cube map of environment distances
201                texture_unit
202                {
[1735]203                        filtering none
[1724]204                }
205               
206                //Cube map of reflective object's normals and distances CCW
207                texture_unit
208                {
[1735]209                        filtering none
[1724]210                }
211               
212                //Cube map of reflective object's normals and distances CW
213                texture_unit
214                {
[1735]215                        filtering none
[1724]216                }
217          }
218    }
[1720]219}
Note: See TracBrowser for help on using the repository browser.