//--------------------------------------------------- //Bloom2: Dark Sylinc's Bloom implementation // Ogre/Compositor/BloomBlend is the final material applied. // it has 2 parameters: // OriginalImageWeight float // BlurWeight float // Usually they range from 0.0 to 1.0; but it can be any number // higher numbers will result in a brighter scene. Increment BlurWeight // to obtain increase Bloom effect. // Works faster on my GeForce 6200 256 MB AGP 8x (Chip NV 43 Rev a1) // than Manuel's bloom. (And at my opinion, looks nicer ;) // Unlike Manuel's bloom, we apply a bright high-filter pass //Copyright (C) Dark Sylinc 2007-2008 //--------------------------------------------------- fragment_program Bloom/BlurV_ps/HLSL hlsl { source compositors/BlurV.glsl target ps_3_0 } fragment_program Bloom/BlurV_ps/GL glsl glsles glslang { source compositors/BlurV.glsl } fragment_program Bloom/BlurV_ps unified { delegate Bloom/BlurV_ps/GL delegate Bloom/BlurV_ps/HLSL } fragment_program Bloom/BlurH_ps/HLSL hlsl { source compositors/BlurH.glsl target ps_3_0 } fragment_program Bloom/BlurH_ps/GL glsl glsles glslang { source compositors/BlurH.glsl } fragment_program Bloom/BlurH_ps unified { delegate Bloom/BlurH_ps/GL delegate Bloom/BlurH_ps/HLSL } fragment_program Bloom/BrightBloom2_ps glsl glsles glslang hlsl { source compositors/BrightBloom2.glsl } fragment_program Bloom/Bloom2_ps_GL glsl glsles { source compositors/Bloom2.glsl default_params { param_named RT int 0 param_named Blur1 int 1 } } fragment_program Bloom/Bloom2_ps_HLSL hlsl glslang { source compositors/Bloom2.glsl target ps_3_0 } fragment_program Bloom/Bloom2_ps unified { delegate Bloom/Bloom2_ps_GL delegate Bloom/Bloom2_ps_HLSL } //Blur: Horizontal Gaussian pass material Ogre/Compositor/BlurH { technique { pass { cull_hardware none depth_check off polygon_mode_overrideable false vertex_program_ref Ogre/Compositor/StdQuad_Tex2_vp { } fragment_program_ref Bloom/BlurH_ps { } texture_unit { tex_coord_set 0 tex_address_mode clamp filtering trilinear } } } } //Blur: Vertical Gaussian pass material Ogre/Compositor/BlurV { technique { pass { cull_hardware none depth_check off polygon_mode_overrideable false vertex_program_ref Ogre/Compositor/StdQuad_Tex2_vp { } fragment_program_ref Bloom/BlurV_ps { } texture_unit { tex_coord_set 0 tex_address_mode clamp filtering trilinear } } } } //Final Bloom pass: Blends the blurred with the sharp image material Ogre/Compositor/BloomBlend2 { technique { pass { cull_hardware none depth_check off polygon_mode_overrideable false vertex_program_ref Ogre/Compositor/StdQuad_Tex2_vp { } fragment_program_ref Bloom/Bloom2_ps { param_named OriginalImageWeight float 1.0 param_named BlurWeight float 0.65 } texture_unit { tex_coord_set 0 tex_address_mode clamp filtering none } texture_unit { tex_coord_set 0 tex_address_mode clamp filtering trilinear } } } } //High-pass Bright filter //First pass material Ogre/Compositor/BrightPass2 { technique { pass { cull_hardware none depth_check off polygon_mode_overrideable false vertex_program_ref Ogre/Compositor/StdQuad_Tex2_vp { } fragment_program_ref Bloom/BrightBloom2_ps { } texture_unit { tex_address_mode clamp filtering none } } } }