source: GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/Diffuse.material @ 1590

Revision 1590, 4.3 KB checked in by szirmay, 18 years ago (diff)
Line 
1material GameTools/CubeMap/Reduce
2{
3
4   technique
5   {
6       pass
7       {
8       //depth_check off
9           lighting off
10       
11            vertex_program_ref GameTools/CubeMap/VertexPrograms/ReduceVS
12         {       
13           // param_named_auto worldViewProj worldviewproj_matrix
14               // param_named_auto world world_matrix
15         }
16         fragment_program_ref GameTools/CubeMap/FragmentPrograms/ReducePS
17         {
18                //param_named_auto cameraPos camera_position     
19         param_named nFace int 0
20         param_named CUBEMAP_SIZE int 256
21         //param_named RATE int 2
22         
23        }
24               
25         //Cube map for reflections and refractions     
26         texture_unit
27         {
28           filtering point point point
29           cubic_texture cubemap.jpg combinedUVW
30           tex_address_mode clamp
31          // env_map cubic_reflection
32           colour_op modulate
33         }
34
35
36        }
37    }
38}
39
40material GameTools/Diffuse
41{
42   technique
43   {
44      pass
45      {
46               
47                IllumTechniques
48                {
49                        RenderTechnique DistanceCubeMap
50                        {
51                                update_interval         1
52                                distance_calc false                                             
53                        }
54                        RenderTechnique ReducedColorCubeMap
55                        {
56                                update_interval         1
57                                reduced_resolution 4
58                                resolution 128
59                                distance_calc false
60                                face_angle_calc false
61                                update_all_face         true
62                        }
63                }
64     
65
66                vertex_program_ref GameTools/DiffuseVS
67                {       
68                 param_named_auto worldViewProj worldviewproj_matrix
69                param_named_auto world world_matrix 
70       
71                }
72                fragment_program_ref GameTools/DiffusePS
73                {
74                        param_named REDUCED_CUBEMAP_SIZE int 8
75                        param_named lastCenter float3 0 0 0             
76                }
77               
78                //Cube map for reflections and refractions     
79                texture_unit
80                {
81                        cubic_texture cubemap.jpg combinedUVW
82                        tex_address_mode clamp
83                        colour_op replace
84                }
85
86                //Cube map of distances
87                texture_unit
88                 {
89                   cubic_texture cubemap.jpg combinedUVW
90                   tex_address_mode clamp
91                   colour_op replace
92                 }
93         }
94   }
95}
96
97
98
99vertex_program Diffuse2VS hlsl
100{
101        source GameTools_Diffuse.hlsl
102        entry_point DiffuseVS
103        target vs_3_0
104}
105
106fragment_program Diffuse2PS hlsl
107{
108        source GameTools_Diffuse.hlsl
109        entry_point DiffusePS
110        target ps_3_0
111}
112
113
114
115material GameTools/Diffuse/use
116{
117   technique
118   {
119      pass
120      {
121               
122                IllumTechniques
123                {
124                        RenderTechnique DistanceCubeMap
125                        {
126                                update_interval         1
127                                distance_calc false                                             
128                        }
129                        RenderTechnique ReducedColorCubeMap
130                        {
131                                update_interval         1
132                                reduced_resolution 4
133                                resolution 128
134                                distance_calc false
135                                face_angle_calc false
136                                update_all_face         true
137                        }
138                }
139     
140
141                vertex_program_ref Diffuse2VS
142                {       
143                 param_named_auto worldViewProj worldviewproj_matrix
144                param_named_auto world world_matrix 
145       
146                }
147                fragment_program_ref Diffuse2PS
148                {
149                        param_named lastCenter float3 0 0 0
150                }
151               
152                //Cube map for reflections and refractions     
153                texture_unit
154                {
155                        cubic_texture cubemap.jpg combinedUVW
156                        tex_address_mode clamp
157                        colour_op replace
158                }
159
160                //Cube map of distances
161                texture_unit
162                 {
163                   cubic_texture cubemap.jpg combinedUVW
164                   tex_address_mode clamp
165                   colour_op replace
166                 }
167         }
168   }
169}
170
171
172fragment_program DiffuseP2PPS hlsl
173{
174        source GameTools_Diffuse.hlsl
175        entry_point EnvMapDiffuseP2PPS
176        target ps_3_0
177}
178
179material GameTools/Diffuse/use1
180{
181   technique
182   {
183      pass
184      {
185               
186                IllumTechniques
187                {
188                        RenderTechnique DistanceCubeMap
189                        {
190                                update_interval         1
191                                distance_calc false     
192                                face_angle_calc false
193                                update_all_face         true                                   
194                        }
195                        RenderTechnique ReducedColorCubeMap
196                        {
197                                update_interval         1
198                                reduced_resolution 4
199                                resolution 128
200                                distance_calc false
201                                face_angle_calc false
202                                update_all_face         true
203                        }
204                }
205     
206
207                vertex_program_ref Diffuse2VS
208                {       
209                 param_named_auto worldViewProj worldviewproj_matrix
210                param_named_auto world world_matrix 
211       
212                }
213                fragment_program_ref DiffuseP2PPS
214                {
215                        param_named REDUCED_CUBEMAP_SIZE int 4
216                        param_named lastCenter float3 0 0 0                             
217                }
218               
219                //Cube map for reflections and refractions     
220                texture_unit
221                {
222                        cubic_texture cubemap.jpg combinedUVW
223                        tex_address_mode clamp
224                        colour_op replace
225                }
226
227                //Cube map of distances
228                texture_unit
229                 {
230                   cubic_texture cubemap.jpg combinedUVW
231                   tex_address_mode clamp
232                   colour_op replace
233                 }
234         }
235   }
236}
Note: See TracBrowser for help on using the repository browser.