source: GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPCaustic/GTPCaustic.material @ 2368

Revision 2368, 4.6 KB checked in by szirmay, 17 years ago (diff)
RevLine 
[2040]1material GTP/Caustic/PhotonMap_HitEnv
2{
3 technique
4 {
5  pass
6  {   
7   vertex_program_ref GTP/Basic/Shaded_VS
8   {
9     param_named_auto WorldViewProj worldviewproj_matrix
10     param_named_auto World         world_matrix
11     param_named_auto WorldInv      inverse_world_matrix
12   }
13   fragment_program_ref GTP/Caustic/PhotonMapHitEnv_PS
14   {
15     param_named_auto cameraPos camera_position
16     param_named lastCenter float3 0 0 0
[2136]17     param_named refIndex float 0.85   
[2040]18   }
19   //cubemap of distances
20   texture_unit
21   {
[2266]22        filtering none
[2040]23   }
24  }
25 }
26}
27
28material GTP/Caustic/CauCube_PointSprite
29{
30 technique
31 {
32  pass
33  {
34   cull_hardware none
35   scene_blend src_alpha one
36   depth_check off
37   point_sprites on
38   vertex_program_ref GTP/Caustic/CauCube_PointSprite_VS
39   {
40     param_named_auto WorldView     worldview_matrix
41     param_named_auto Proj          projection_matrix
[2175]42     param_named CauSpriteSize      float 10
[2040]43   }
44   fragment_program_ref GTP/Caustic/CauCube_PointSprite_PS
45   {
[2175]46     param_named CausticColor float4          1 1 1 0.8
[2040]47   }
48   texture_unit
49   {
50     vertex_texture true         
51   }
52   texture_unit
53   {
54     texture PowerOfPhotonHitTexel.dds
55   }
56  }
57 }
58}
59
60material GTP/Caustic/CauCube_Triangles
61{
62 technique
63 {
64  pass
65  {
66   cull_hardware none
67   scene_blend src_alpha one
68   depth_write off
69   vertex_program_ref GTP/Caustic/CauCube_Triangles_VS
70   {
71     param_named_auto WorldView      worldview_matrix
72     param_named_auto Proj           projection_matrix
[2136]73     param_named PhotonMapResolution float 64
74     param_named WorldSize float 10
[2040]75   }
76   fragment_program_ref GTP/Caustic/CauCube_Triangles_PS
77   {
78     param_named CausticColor float4 0.7 0.7 0.5 1
[2136]79     
[2040]80   }
81   texture_unit
82   {
83     vertex_texture true         
84   }
85  }
86 }
87}
88
89material GTP/Caustic/Glass
90{
91   technique
92   {   
93      pass
94      {
95                 IllumTechniques
96                 {
97                        RenderTechnique ColorCubeMap
98                        {
[2266]99                                update_interval         0
[2054]100                                update_all_face true                                                                   
[2040]101                        }
102                        RenderTechnique DistanceCubeMap
103                        {
[2266]104                                update_interval         0
[2054]105                                update_all_face true                                                                           
[2040]106                        }
107                        RenderTechnique CausticCaster
108                        {
[2054]109                                attenuation     1000
[2136]110                                update_interval 1
111                                update_all_face true
112                                photonmap_resolution 64
[2040]113                                caustic_cubemap_resolution 256
114                                photon_map_material     GTP/Caustic/PhotonMap_HitEnv
[2136]115                                //caustic_map_material  GTP/Caustic/CauCube_PointSprite
116                                caustic_map_material    GTP/Caustic/CauCube_Triangles
117                                use_triangles   true
118                                blur_caustic_cubemap true                               
[2040]119                        }
120                       
121                 }     
[2175]122         vertex_program_ref GTP/Basic/Shaded_VS
[2040]123         {       
124            param_named_auto WorldViewProj worldviewproj_matrix
125            param_named_auto World world_matrix
126            param_named_auto WorldInv inverse_world_matrix
127         }
[2054]128         fragment_program_ref GTP/EnvMap/Localized_Refraction_PS
[2040]129         {
[2368]130            param_named_auto cameraPos camera_position
[2040]131            param_named lastCenter float3 0 0 0
132            param_named sFresnel float 0.1
[2337]133            param_named sRefraction float 0.85
[2368]134
[2040]135             }         
136             //Cube map for reflections and refractions
137             texture_unit
138             {
139           
140             }
141             //Cube map of distances
142             texture_unit
143             {
[2266]144                filtering none
[2040]145             }
146          }
147   }
[2175]148}
149
150material GTP/Caustic/Glass_PointSprite
151{
152   technique
153   {   
154      pass
155      {
156                 IllumTechniques
157                 {
158                        RenderTechnique ColorCubeMap
159                        {
[2266]160                                update_interval         0
[2175]161                                update_all_face true                                                                   
162                        }
163                        RenderTechnique DistanceCubeMap
164                        {
[2266]165                                update_interval         0
[2175]166                                update_all_face true                                                                           
167                        }
168                        RenderTechnique CausticCaster
169                        {
170                                attenuation     1000
171                                update_interval 1
172                                update_all_face true
173                                photonmap_resolution 64
174                                caustic_cubemap_resolution 256
175                                photon_map_material     GTP/Caustic/PhotonMap_HitEnv
176                                caustic_map_material    GTP/Caustic/CauCube_PointSprite
177                                blur_caustic_cubemap false
178                        }
179                       
180                 }     
181         vertex_program_ref GTP/Basic/Shaded_VS
182         {       
183            param_named_auto WorldViewProj worldviewproj_matrix
184            param_named_auto World world_matrix
185            param_named_auto WorldInv inverse_world_matrix
186         }
187         fragment_program_ref GTP/EnvMap/Localized_Refraction_PS
188         {
189                    param_named_auto cameraPos camera_position
190            param_named lastCenter float3 0 0 0
191            param_named sFresnel float 0.1
[2301]192            param_named sRefraction float 0.8
[2175]193             }         
194             //Cube map for reflections and refractions
195             texture_unit
196             {
197           
198             }
199             //Cube map of distances
200             texture_unit
201             {
[2266]202                filtering none
[2175]203             }
204          }
205   }
[2040]206}
Note: See TracBrowser for help on using the repository browser.