Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/trunk/materials/glow.material @ 9509

Last change on this file since 9509 was 9509, checked in by davidsa, 11 years ago

tweaked and added more lens flare materials, tweaked the glow material

File size: 3.9 KB
Line 
1vertex_program glow_vs cg
2{
3        source vs_glow.cg
4        entry_point main
5        profiles vs_1_1 arbvp1
6}
7
8fragment_program glow_ps cg
9{
10        source ps_glow.cg
11        entry_point main
12        profiles ps_2_0 arbfp1 
13}
14
15material glow
16{
17        technique
18        {
19                pass
20                {
21                        scene_blend alpha_blend
22                        depth_check on
23                        lighting off
24
25                        //what color should the glow be, emissive light can be changed through ogre as well
26                        emissive 0.5 0.9 1.0 0.0
27                       
28                        vertex_program_ref glow_vs
29                        {
30                                //don't worry about auto parameters here, they are given
31                                param_named_auto iWorldTMatrix inverse_transpose_world_matrix
32                                param_named_auto iViewMatrix inverse_view_matrix
33                                param_named_auto worldMatrix   world_matrix
34                                param_named_auto viewProjMatrix viewproj_matrix
35
36                                //how much should the glow expand from the model, usually a small value
37                                param_named inflate float 0.1
38                        }
39                       
40                        fragment_program_ref glow_ps
41                        {
42                                //base alpha value of glow
43                                param_named alphaValue float 0.6
44
45                                //from which view to surface normal angle on should the intensity of the glow decrease
46                                param_named cutoffAngle float 65.0
47
48                                //by which exponent should the intensity decrease
49                                param_named exponent float 3.0
50
51                                //how fast should the light pulsate
52                                param_named_auto time time_0_x 50
53
54                                //don't worry about this one, it makes sure we use the emissive color value
55                                param_named_auto color surface_emissive_colour
56                        }
57                }
58               
59        }
60}
61
62material glow/drone
63{
64        technique
65        {
66                pass
67                {
68                        scene_blend alpha_blend
69                        depth_check on
70                        lighting off
71
72                        texture_unit
73                        {
74                                texture drone.png
75                        }
76                }
77                pass
78                {
79                        scene_blend alpha_blend
80                        depth_check on
81                        lighting off
82                        emissive 0.5 0.9 1.0 0.0
83
84                        vertex_program_ref glow_vs
85                        {
86                                param_named_auto iWorldTMatrix inverse_transpose_world_matrix
87                                param_named_auto iViewMatrix inverse_view_matrix
88                                param_named_auto worldMatrix   world_matrix
89                                param_named_auto viewProjMatrix viewproj_matrix
90                                param_named inflate float 0.2
91                        }
92                       
93                        fragment_program_ref glow_ps
94                        {
95                                param_named alphaValue float 0.4
96                                param_named cutoffAngle float 70.0
97                                param_named exponent float 2.5
98                                param_named_auto time time_0_x 50
99                                param_named_auto color surface_emissive_colour
100                        }
101                }
102               
103        }
104}
Note: See TracBrowser for help on using the repository browser.