(Cg/GLSL) Cleanups to filter_type implementation