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

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