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)
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                               
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
124        flow_control prefer
125}
126
127material MetalTeapotMultipleBounce
128{
129   technique
130   {
131      pass
132      {
133                IllumTechniques
134                {
135                        RenderTechnique ColorCubeMap
136                        {
137                                resolution 1024
138                                update_interval         0
139                                distance_calc false
140                                face_angle_calc false
141                                update_all_face true                                   
142                        }
143                        RenderTechnique DistanceCubeMap
144                        {
145                                resolution 1024
146                                update_interval         0
147                                distance_calc false
148                                face_angle_calc false
149                                update_all_face true
150                        }
151                        RenderTechnique ColorCubeMap
152                        {
153                                resolution 1024
154                                layer 1
155                                texture_unit_id 2
156                                update_interval         0
157                                distance_calc false
158                                face_angle_calc false
159                                update_all_face true
160                                render_env false
161                                render_self true
162                                self_material NormalDistanceCCW
163                        }
164                        RenderTechnique ColorCubeMap
165                        {
166                                resolution 1024
167                                layer 2
168                                texture_unit_id 3
169                                update_interval         0
170                                distance_calc false
171                                face_angle_calc false
172                                update_all_face true
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                {
198                        //filtering none
199                }
200                //Cube map of environment distances
201                texture_unit
202                {
203                        filtering none
204                }
205               
206                //Cube map of reflective object's normals and distances CCW
207                texture_unit
208                {
209                        filtering none
210                }
211               
212                //Cube map of reflective object's normals and distances CW
213                texture_unit
214                {
215                        filtering none
216                }
217          }
218    }
219}
Note: See TracBrowser for help on using the repository browser.