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

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