Improved shader compilation and linking code