vertex_program hiliting_vert glsl
{ source selection_hiliting.vert }

fragment_program hiliting_frag glsl
{ source selection_hiliting.frag }

material effects/selection/dry_run {
    technique {
        pass {
            depth_write off
            colour_write off
        }
    }
}

material effects/selection/outline_hiliting {
    technique {
        pass {
            scene_blend src_alpha dest_alpha
            depth_write off
            lighting off
            cull_hardware none
            cull_software none

            vertex_program_ref hiliting_vert {
                param_named hiliting_size float 0.1
                param_named_auto time time_0_x 100
            }
            fragment_program_ref hiliting_frag {
                param_named hiliting_color float4 1.0 1.0 0.0 0.4
                param_named_auto time time_0_x 100
            }
        }
    }
}

material effects/selection/filled_hiliting_1 : effects/selection/outline_hiliting {
    technique {
        pass {
            scene_blend alpha_blend
            fragment_program_ref hiliting_frag
            { param_named hiliting_color float4 1.0 1.0 0.0 0.0 }
        }
    }
}

material effects/selection/filled_hiliting_2 : effects/selection/outline_hiliting {
    technique {
        pass
        { depth_check off }
    }
}
