vertex_program fullscreen_quad_vert glsl
{ source fullscreen_quad.vert }

fragment_program combine_scene_and_glow_frag glsl
{ source combine_scene_and_glow.frag }

fragment_program horizontal_pass_1_frag glsl
{ source horizontal_pass_1.frag }

fragment_program horizontal_pass_4_frag glsl
{ source horizontal_pass_4.frag }

fragment_program vertical_pass_1_frag glsl
{ source vertical_pass_1.frag }

fragment_program vertical_pass_4_frag glsl
{ source vertical_pass_4.frag }

fragment_program combine_passes_frag glsl
{ source combine_passes.frag }

fragment_program final_copy_frag glsl
{ source final_copy.frag }

material effects/glow/combine_scene_and_glow_geometry {
    technique {
        pass {
            cull_hardware none
            cull_software none
            depth_check off
            vertex_program_ref fullscreen_quad_vert
            { }
            fragment_program_ref combine_scene_and_glow_frag {
                param_named scene int 0
                param_named glow_geometry int 1
            }
            texture_unit {
                tex_address_mode clamp
                filtering linear linear none
            }
            texture_unit {
                tex_address_mode clamp
                filtering linear linear none
            }
        }
    }
}

material effects/glow/horizontal_pass_1 {
    technique {
        pass {
            cull_hardware none
            cull_software none
            depth_check off
            vertex_program_ref fullscreen_quad_vert
            { }
            fragment_program_ref horizontal_pass_1_frag {
                param_named source int 0
                param_named texture_width float 1024.0
            }
            texture_unit {
                tex_address_mode clamp
                filtering linear linear none
            }
        }
    }
}

material effects/glow/horizontal_pass_2 : effects/glow/horizontal_pass_1 {
    technique {
        pass {
            fragment_program_ref horizontal_pass_1_frag
            { param_named texture_width float 256.0 }
        }
    }
}

material effects/glow/horizontal_pass_3 : effects/glow/horizontal_pass_1 {
    technique {
        pass {
            fragment_program_ref horizontal_pass_1_frag
            { param_named texture_width float 64.0 }
        }
    }
}

material effects/glow/horizontal_pass_4 : effects/glow/horizontal_pass_1 {
    technique {
        pass {
            fragment_program_ref horizontal_pass_4_frag {
                param_named source int 0
                param_named texture_width float 16.0
            }
        }
    }
}

material effects/glow/vertical_pass_1 : effects/glow/horizontal_pass_1 {
    technique {
        pass {
            fragment_program_ref vertical_pass_1_frag {
                param_named source int 0
                param_named texture_width float 1024.0
            }
        }
    }
}

material effects/glow/vertical_pass_2 : effects/glow/vertical_pass_1 {
    technique {
        pass {
            fragment_program_ref vertical_pass_1_frag
            { param_named texture_width float 256.0 }
        }
    }
}

material effects/glow/vertical_pass_3 : effects/glow/vertical_pass_1 {
    technique {
        pass {
            fragment_program_ref vertical_pass_1_frag
            { param_named texture_width float 64.0 }
        }
    }
}

material effects/glow/vertical_pass_4 : effects/glow/vertical_pass_1 {
    technique {
        pass {
            fragment_program_ref vertical_pass_4_frag {
                param_named source int 0
                param_named texture_width float 16.0
            }
        }
    }
}

material effects/glow/combine_passes {
    technique {
        pass {
            cull_hardware none
            cull_software none
            depth_check off
            vertex_program_ref fullscreen_quad_vert
            { }
            fragment_program_ref combine_passes_frag {
                param_named scene int 0
                param_named pass_1 int 1
                param_named pass_2 int 2
                param_named pass_3 int 3
                param_named pass_4 int 4
            }
            texture_unit {
                tex_address_mode clamp
                filtering linear linear none
            }
            texture_unit {
                tex_address_mode clamp
                filtering linear linear none
            }
            texture_unit {
                tex_address_mode clamp
                filtering linear linear none
            }
            texture_unit {
                tex_address_mode clamp
                filtering linear linear none
            }
            texture_unit {
                tex_address_mode clamp
                filtering linear linear none
            }
        }
    }
}

material effects/glow/final_copy {
    technique {
        pass {
            cull_hardware none
            cull_software none
            depth_check off
            vertex_program_ref fullscreen_quad_vert
            { }
            fragment_program_ref final_copy_frag
            { param_named source int 0 }
            texture_unit
            { }
        }
    }
}
