Modify vertex shader source if show attribute is available. Move property getter and setter function creation outside of loop.