Last change
on this file since 9408 was
9408,
checked in by davidsa, 12 years ago
|
Added: rudimentary stencil outline glow shader, very basic and looks pretty ugly, but good enough to test stencil buffer functionality
|
File size:
2.1 KB
|
Rev | Line | |
---|
[9408] | 1 | vertex_program glow_vs cg |
---|
| 2 | { |
---|
| 3 | source vs_glow.cg |
---|
| 4 | entry_point main |
---|
| 5 | profiles vs_1_1 arbvp1 |
---|
| 6 | } |
---|
| 7 | |
---|
| 8 | fragment_program glow_ps cg |
---|
| 9 | { |
---|
| 10 | source ps_glow.cg |
---|
| 11 | entry_point main |
---|
| 12 | profiles ps_2_0 arbfp1 |
---|
| 13 | } |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | material glow |
---|
| 17 | { |
---|
| 18 | technique |
---|
| 19 | { |
---|
| 20 | pass |
---|
| 21 | { |
---|
| 22 | scene_blend alpha_blend |
---|
| 23 | depth_check on |
---|
| 24 | lighting off |
---|
| 25 | emissive 1.0 1.0 0.0 0.0 |
---|
| 26 | |
---|
| 27 | vertex_program_ref glow_vs |
---|
| 28 | { |
---|
| 29 | param_named_auto worldViewProjMatrix worldviewproj_matrix |
---|
| 30 | param_named size_value float 1.1 |
---|
| 31 | param_named_auto time time_0_x 100 |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | fragment_program_ref glow_ps |
---|
| 35 | { |
---|
| 36 | param_named alpha_value float 0.4 |
---|
| 37 | param_named_auto time time_0_x 100 |
---|
| 38 | param_named_auto color surface_emissive_colour |
---|
| 39 | } |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | } |
---|
| 43 | } |
---|
| 44 | |
---|
| 45 | material glow/drone |
---|
| 46 | { |
---|
| 47 | technique |
---|
| 48 | { |
---|
| 49 | pass |
---|
| 50 | { |
---|
| 51 | scene_blend alpha_blend |
---|
| 52 | depth_check on |
---|
| 53 | lighting off |
---|
| 54 | |
---|
| 55 | texture_unit |
---|
| 56 | { |
---|
| 57 | texture drone.png |
---|
| 58 | } |
---|
| 59 | } |
---|
| 60 | pass |
---|
| 61 | { |
---|
| 62 | scene_blend alpha_blend |
---|
| 63 | depth_check on |
---|
| 64 | lighting off |
---|
| 65 | emissive 0.5 0.9 1.0 0.0 |
---|
| 66 | |
---|
| 67 | vertex_program_ref glow_vs |
---|
| 68 | { |
---|
| 69 | param_named_auto worldViewProjMatrix worldviewproj_matrix |
---|
| 70 | param_named size_value float 0.2 |
---|
| 71 | param_named_auto time time_0_x 50 |
---|
| 72 | } |
---|
| 73 | |
---|
| 74 | fragment_program_ref glow_ps |
---|
| 75 | { |
---|
| 76 | param_named alpha_value float 0.4 |
---|
| 77 | param_named_auto time time_0_x 50 |
---|
| 78 | param_named_auto color surface_emissive_colour |
---|
| 79 | } |
---|
| 80 | } |
---|
| 81 | |
---|
| 82 | } |
---|
| 83 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.