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)
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
119fragment_program MetalMultipleBouncePS hlsl
120{
[1859]121        //source MetalTeapot.hlsl
122        //entry_point MetalMultipleBouncePS
123        source MetalTeapotNew.hlsl
124    entry_point mainPS
125
[1724]126        target ps_3_0
[1735]127        flow_control prefer
[1724]128}
129
130material MetalTeapotMultipleBounce
131{
132   technique
133   {
134      pass
135      {
[1860]136        //cull_hardware none
[1724]137                IllumTechniques
138                {
139                        RenderTechnique ColorCubeMap
140                        {
[1735]141                                resolution 1024
142                                update_interval         0
[1724]143                                distance_calc false
[1730]144                                face_angle_calc false
145                                update_all_face true                                   
[1724]146                        }
147                        RenderTechnique DistanceCubeMap
148                        {
[1735]149                                resolution 1024
150                                update_interval         0
151                                distance_calc false
152                                face_angle_calc false
[1730]153                                update_all_face true
[1724]154                        }
155                        RenderTechnique ColorCubeMap
156                        {
[1735]157                                resolution 1024
[1724]158                                layer 1
159                                texture_unit_id 2
[1735]160                                update_interval         0
161                                distance_calc false
162                                face_angle_calc false
[1730]163                                update_all_face true
[1724]164                                render_env false
165                                render_self true
166                                self_material NormalDistanceCCW
167                        }
168                        RenderTechnique ColorCubeMap
169                        {
[1735]170                                resolution 1024
[1724]171                                layer 2
172                                texture_unit_id 3
[1735]173                                update_interval         0
174                                distance_calc false
175                                face_angle_calc false
[1730]176                                update_all_face true
[1724]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
[1854]196                        param_named F0 float3 0.95 0.95 0.95
[1860]197                        param_named SingleBounce float 0.0
[1879]198                        param_named refIndex float 0.6667                       
[1724]199                }
200               
201                //Cube map of environment
202                texture_unit
203                {
[1735]204                        //filtering none
[1724]205                }
206                //Cube map of environment distances
207                texture_unit
208                {
[1735]209                        filtering none
[1724]210                }
211               
212                //Cube map of reflective object's normals and distances CCW
213                texture_unit
214                {
[1735]215                        filtering none
[1724]216                }
217               
218                //Cube map of reflective object's normals and distances CW
219                texture_unit
220                {
[1735]221                        filtering none
[1724]222                }
223          }
224    }
[1720]225}
Note: See TracBrowser for help on using the repository browser.