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

Revision 2136, 3.2 KB checked in by szirmay, 17 years ago (diff)
Line 
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
17     param_named refIndex float 0.85   
18   }
19   //cubemap of distances
20   texture_unit
21   {
22   
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
42     param_named CauSpriteSize      float 20
43   }
44   fragment_program_ref GTP/Caustic/CauCube_PointSprite_PS
45   {
46     param_named CausticColor float4          0.7 0.7 0.5 0.3
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
73     param_named PhotonMapResolution float 64
74     param_named WorldSize float 10
75   }
76   fragment_program_ref GTP/Caustic/CauCube_Triangles_PS
77   {
78     param_named CausticColor float4 0.7 0.7 0.5 1
79     
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                        {
99                                update_interval         1
100                                update_all_face true                                                                   
101                        }
102                        RenderTechnique DistanceCubeMap
103                        {
104                                update_interval         1
105                                update_all_face true                                                                           
106                        }
107                        RenderTechnique CausticCaster
108                        {
109                                attenuation     1000
110                                update_interval 1
111                                update_all_face true
112                                photonmap_resolution 64
113                                caustic_cubemap_resolution 256
114                                photon_map_material     GTP/Caustic/PhotonMap_HitEnv
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                               
119                        }
120                       
121                 }     
122         vertex_program_ref GTP/Basic/ShadedTex_VS
123         {       
124            param_named_auto WorldViewProj worldviewproj_matrix
125            param_named_auto World world_matrix
126            param_named_auto WorldInv inverse_world_matrix
127         }
128         fragment_program_ref GTP/EnvMap/Localized_Refraction_PS
129         {
130                    param_named_auto cameraPos camera_position
131            param_named lastCenter float3 0 0 0
132            param_named sFresnel float 0.1
133            param_named sRefraction float 0.9
134             }         
135             //Cube map for reflections and refractions
136             texture_unit
137             {
138           
139             }
140             //Cube map of distances
141             texture_unit
142             {
143           
144             }
145          }
146   }
147}
Note: See TracBrowser for help on using the repository browser.