Rev | Line | |
---|
[11084] | 1 | compositor Glow |
---|
| 2 | { |
---|
| 3 | technique |
---|
| 4 | { |
---|
| 5 | texture rt_output target_width target_height PF_A8R8G8B8 |
---|
| 6 | texture glowMap target_width_scaled 0.25 target_height_scaled 0.25 PF_A8R8G8B8 |
---|
| 7 | texture blurX target_width_scaled 0.25 target_height_scaled 0.25 PF_A8R8G8B8 |
---|
| 8 | texture blurXY target_width_scaled 0.25 target_height_scaled 0.25 PF_A8R8G8B8 |
---|
| 9 | |
---|
| 10 | //Fetch scene contents. |
---|
| 11 | target rt_output |
---|
| 12 | { |
---|
| 13 | input previous |
---|
| 14 | } |
---|
| 15 | |
---|
| 16 | //Get scene rendered with 'Glow' scheme |
---|
| 17 | target glowMap |
---|
| 18 | { |
---|
| 19 | input none |
---|
| 20 | material_scheme glow |
---|
| 21 | pass clear |
---|
| 22 | { |
---|
| 23 | } |
---|
| 24 | pass render_scene |
---|
| 25 | { |
---|
| 26 | } |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | //Blur it along X. |
---|
| 30 | target blurX |
---|
| 31 | { |
---|
| 32 | input none |
---|
| 33 | pass render_quad |
---|
| 34 | { |
---|
| 35 | material GlowCompositorMat/GlowX |
---|
| 36 | input 0 glowMap |
---|
| 37 | } |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | //Blur it along Y. |
---|
| 41 | target blurXY |
---|
| 42 | { |
---|
| 43 | input none |
---|
| 44 | pass render_quad |
---|
| 45 | { |
---|
| 46 | material GlowCompositorMat/GlowY |
---|
| 47 | input 0 blurX |
---|
| 48 | } |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | //add to original, and output. |
---|
| 52 | target_output |
---|
| 53 | { |
---|
| 54 | input none |
---|
| 55 | pass render_quad |
---|
| 56 | { |
---|
| 57 | material GlowCompositorMat/GlowBlend |
---|
| 58 | input 0 rt_output |
---|
| 59 | input 1 blurXY |
---|
| 60 | } |
---|
| 61 | } |
---|
| 62 | } |
---|
| 63 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.