shader main method for different APIs; different temporary declaration for vs and ps.