| [9408] | 1 | vertex_program glow_vs cg | 
|---|
 | 2 | { | 
|---|
| [9425] | 3 |         source vs_glow.cg | 
|---|
 | 4 |         entry_point main | 
|---|
 | 5 |         profiles vs_1_1 arbvp1 | 
|---|
| [9408] | 6 | } | 
|---|
 | 7 |  | 
|---|
 | 8 | fragment_program glow_ps cg | 
|---|
 | 9 | { | 
|---|
| [9425] | 10 |         source ps_glow.cg | 
|---|
 | 11 |         entry_point main | 
|---|
 | 12 |         profiles ps_2_0 arbfp1   | 
|---|
| [9408] | 13 | } | 
|---|
 | 14 |  | 
|---|
 | 15 | material glow | 
|---|
 | 16 | { | 
|---|
| [9425] | 17 |         technique | 
|---|
 | 18 |         { | 
|---|
 | 19 |                 pass | 
|---|
 | 20 |                 { | 
|---|
 | 21 |                         scene_blend alpha_blend | 
|---|
 | 22 |                         depth_check on | 
|---|
 | 23 |                         lighting off | 
|---|
| [9427] | 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 | 
|---|
| [9425] | 27 |                          | 
|---|
 | 28 |                         vertex_program_ref glow_vs | 
|---|
 | 29 |                         { | 
|---|
| [9427] | 30 |                                 //don't worry about auto parameters here, they are given | 
|---|
 | 31 |                                 param_named_auto iWorldTMatrix inverse_transpose_world_matrix | 
|---|
| [9425] | 32 |                                 param_named_auto iViewMatrix inverse_view_matrix | 
|---|
 | 33 |                                 param_named_auto worldMatrix   world_matrix | 
|---|
 | 34 |                                 param_named_auto viewProjMatrix viewproj_matrix | 
|---|
| [9427] | 35 |  | 
|---|
 | 36 |                                 //how much should the glow expand from the model, usually a small value | 
|---|
| [9509] | 37 |                                 param_named inflate float 0.1 | 
|---|
| [9425] | 38 |                         } | 
|---|
 | 39 |                          | 
|---|
 | 40 |                         fragment_program_ref glow_ps | 
|---|
 | 41 |                         { | 
|---|
| [9427] | 42 |                                 //base alpha value of glow | 
|---|
| [9509] | 43 |                                 param_named alphaValue float 0.6 | 
|---|
| [9427] | 44 |  | 
|---|
 | 45 |                                 //from which view to surface normal angle on should the intensity of the glow decrease | 
|---|
| [9509] | 46 |                                 param_named cutoffAngle float 65.0 | 
|---|
| [9427] | 47 |  | 
|---|
 | 48 |                                 //by which exponent should the intensity decrease | 
|---|
| [9509] | 49 |                                 param_named exponent float 3.0 | 
|---|
| [9427] | 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 | 
|---|
| [9425] | 56 |                         } | 
|---|
 | 57 |                 } | 
|---|
 | 58 |                  | 
|---|
 | 59 |         } | 
|---|
| [9408] | 60 | } | 
|---|
 | 61 |  | 
|---|
 | 62 | material 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 | 
|---|
| [9921] | 82 |                         emissive 0.5 0.2 0.1 0.0 | 
|---|
| [9408] | 83 |  | 
|---|
 | 84 |                         vertex_program_ref glow_vs | 
|---|
 | 85 |                         { | 
|---|
| [9425] | 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 | 
|---|
| [9408] | 91 |                         } | 
|---|
 | 92 |                          | 
|---|
 | 93 |                         fragment_program_ref glow_ps | 
|---|
 | 94 |                         { | 
|---|
| [9425] | 95 |                                 param_named alphaValue float 0.4 | 
|---|
 | 96 |                                 param_named cutoffAngle float 70.0 | 
|---|
 | 97 |                                 param_named exponent float 2.5 | 
|---|
| [9408] | 98 |                                 param_named_auto time time_0_x 50 | 
|---|
 | 99 |                                 param_named_auto color surface_emissive_colour | 
|---|
 | 100 |                         } | 
|---|
 | 101 |                 } | 
|---|
 | 102 |                  | 
|---|
 | 103 |         } | 
|---|
| [9921] | 104 | } | 
|---|