// TODO: THIS IS JUST A WORKAROUND, REMOVE THIS private static void CheckResult(CompilerResults compilerResult) { // Check errors if (compilerResult.HasErrors) { throw new InvalidOperationException("Could not compile shader. See error messages." + compilerResult.ToText()); } }