Improve compat in cg2glsl.

Allow vertex samplers, and fix "empty struct" bug.