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

Revision 2054, 3.1 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 reflIndex 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 32
74   }
75   fragment_program_ref GTP/Caustic/CauCube_Triangles_PS
76   {
77     param_named CausticColor float4 0.7 0.7 0.5 1
78   }
79   texture_unit
80   {
81     vertex_texture true         
82   }
83  }
84 }
85}
86
87material GTP/Caustic/Glass
88{
89   technique
90   {   
91      pass
92      {
93                 IllumTechniques
94                 {
95                        RenderTechnique ColorCubeMap
96                        {
97                                update_interval         0
98                                update_all_face true                                                                   
99                        }
100                        RenderTechnique DistanceCubeMap
101                        {
102                                update_interval         0
103                                update_all_face true                                                                           
104                        }
105                        RenderTechnique CausticCaster
106                        {
107                                attenuation     1000
108                                photonmap_resolution 32
109                                caustic_cubemap_resolution 256
110                                photon_map_material     GTP/Caustic/PhotonMap_HitEnv
111                                caustic_map_material    GTP/Caustic/CauCube_PointSprite
112                                //caustic_map_material  GTP/Caustic/CauCube_Triangles
113                                //use_triangles true
114                                //blur_caustic_cubemap true                             
115                        }
116                       
117                 }     
118         vertex_program_ref GTP/Basic/ShadedTex_VS
119         {       
120            param_named_auto WorldViewProj worldviewproj_matrix
121            param_named_auto World world_matrix
122            param_named_auto WorldInv inverse_world_matrix
123         }
124         fragment_program_ref GTP/EnvMap/Localized_Refraction_PS
125         {
126                    param_named_auto cameraPos camera_position
127            param_named lastCenter float3 0 0 0
128            param_named sFresnel float 0.1
129            param_named sRefraction float 0.9
130             }         
131             //Cube map for reflections and refractions
132             texture_unit
133             {
134           
135             }
136             //Cube map of distances
137             texture_unit
138             {
139           
140             }
141          }
142   }
143}
Note: See TracBrowser for help on using the repository browser.