/// <summary>
        ///
        /// </summary>
        /// <param name="combinedData"></param>
        protected GenericShader(string combinedData)
        {
            int    firstPos = combinedData.IndexOf("//# region ", StringComparison.Ordinal);
            string header   = combinedData.Substring(0, firstPos);

            int regionAmount = combinedData.Split(new string[] { "//# region " }, StringSplitOptions.None).Length - 1;
            int pos          = firstPos + 10;

            string vertex   = "";
            string geometry = "";
            string fragment = "";

            for (int i = 0; i < regionAmount; i++)
            {
                int    posOfBreak = combinedData.IndexOf("\n", pos, StringComparison.Ordinal);
                string name       = combinedData.Substring(pos, posOfBreak - pos).Trim();

                int nextPos = i == regionAmount - 1 ? combinedData.Length : combinedData.IndexOf("//# region ", posOfBreak, StringComparison.Ordinal);

                string data = header + combinedData.Substring(posOfBreak, nextPos - posOfBreak);
                pos = nextPos + 10;

                switch (name)
                {
                case "vertex":
                    vertex = data.Replace("vmain()", "main()");
                    break;

                case "geometry":
                    geometry = data.Replace("gmain()", "main()");
                    break;

                case "fragment":
                    fragment = data.Replace("fmain()", "main()");
                    break;
                }
            }

            Console.WriteLine();

            ShaderFiles = new ShaderFileCollection(vertex, fragment, geometry);
        }
 /// <inheritdoc />
 protected GenericShader(ShaderFileCollection shaderFileFiles)
 {
     ShaderFiles = shaderFileFiles;
 }
 /// <summary>
 /// Updates the shader files and recompiles the shader.
 /// </summary>
 /// <param name="newShaderFiles"></param>
 public void Update(ShaderFileCollection newShaderFiles)
 {
     ShaderFiles = newShaderFiles;
     Recompile();
 }