Last change
on this file since 44 was
44,
checked in by bknecht, 17 years ago
|
merge from tutorial branche to trunk
|
File size:
1.7 KB
|
Rev | Line | |
---|
[25] | 1 | fragment_program DOF_Blur_ps cg |
---|
| 2 | { |
---|
| 3 | source DOF_ps.cg |
---|
| 4 | entry_point blur |
---|
| 5 | profiles ps_2_0 arbfp1 |
---|
| 6 | } |
---|
| 7 | |
---|
| 8 | fragment_program DOF_Blend_ps cg |
---|
| 9 | { |
---|
| 10 | source DOF_ps.cg |
---|
| 11 | entry_point blend |
---|
| 12 | profiles ps_2_0 arbfp1 |
---|
| 13 | } |
---|
| 14 | |
---|
| 15 | //Effect: Depth of Field |
---|
| 16 | material Ogre/Compositor/DOF_Blur0 |
---|
| 17 | { |
---|
| 18 | technique |
---|
| 19 | { |
---|
| 20 | //Rendering Pass: Blur0 (pass index: #1 ) |
---|
| 21 | pass |
---|
| 22 | { |
---|
| 23 | //State: D3DRS_CULLMODE, Value : D3DCULL_NONE |
---|
| 24 | cull_hardware none |
---|
| 25 | cull_software none |
---|
| 26 | depth_check off |
---|
| 27 | |
---|
| 28 | fragment_program_ref DOF_Blur_ps |
---|
| 29 | { |
---|
| 30 | param_named sampleDistance float 0.1 |
---|
| 31 | } |
---|
| 32 | vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp |
---|
| 33 | { |
---|
| 34 | } |
---|
| 35 | texture_unit |
---|
| 36 | { |
---|
| 37 | // texture will get added at runtime |
---|
| 38 | tex_coord_set 0 |
---|
| 39 | tex_address_mode wrap |
---|
| 40 | filtering trilinear |
---|
| 41 | } |
---|
| 42 | } |
---|
| 43 | } |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | // cheat here by copying from DOF_Blur0 |
---|
| 47 | material Ogre/Compositor/DOF_Blur1 : Ogre/Compositor/DOF_Blur0 |
---|
| 48 | { |
---|
| 49 | technique |
---|
| 50 | { |
---|
| 51 | //Rendering Pass: Blur0 (pass index: #1 ) |
---|
| 52 | pass |
---|
| 53 | { |
---|
| 54 | // use the same pixel shader as DOF_Blur0 |
---|
| 55 | fragment_program_ref |
---|
| 56 | { |
---|
| 57 | // override value from copied DOF_Blur0 material |
---|
| 58 | param_named sampleDistance float 0.1 |
---|
| 59 | } |
---|
| 60 | } |
---|
| 61 | } |
---|
| 62 | } |
---|
| 63 | |
---|
| 64 | material Ogre/Compositor/DOF_Blend |
---|
| 65 | { |
---|
| 66 | technique |
---|
| 67 | { |
---|
| 68 | pass |
---|
| 69 | { |
---|
| 70 | fragment_program_ref DOF_Blend_ps |
---|
| 71 | { |
---|
| 72 | param_named focus float 0.66 |
---|
| 73 | param_named range float 1.0 |
---|
| 74 | } |
---|
| 75 | vertex_program_ref Ogre/Compositor/StdQuad_Tex2a_vp |
---|
| 76 | { |
---|
| 77 | } |
---|
| 78 | texture_unit Blur0 |
---|
| 79 | { |
---|
| 80 | // texture will get added at runtime |
---|
| 81 | tex_coord_set 0 |
---|
| 82 | tex_address_mode clamp |
---|
| 83 | filtering trilinear |
---|
| 84 | } |
---|
| 85 | texture_unit Blur1 |
---|
| 86 | { |
---|
| 87 | // texture will get added at runtime |
---|
| 88 | tex_coord_set 0 |
---|
| 89 | tex_address_mode clamp |
---|
| 90 | filtering trilinear |
---|
| 91 | } |
---|
| 92 | } |
---|
| 93 | } |
---|
| 94 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.