Example #1
0
        public static Shader CreateShader(ShaderSettings settings)
        {
            var constructor = new ShaderConstructor(settings);

            constructor.GenerateVertex();
            constructor.GenerateFragment();
            return(constructor.Creator());
        }
Example #2
0
        public static Shader CreateShader(string vs, string fs)
        {
            var constructor = new ShaderConstructor();

            constructor.rawVertex   = vs;
            constructor.rawFragment = fs;
            return(constructor.Creator());
        }
Example #3
0
        private void CreateShader()
        {
            string path = "Toys.Resourses.shaders.";
            string vs   = ShaderManager.ReadFromAssetStream(path + "PM.vsh");
            string fs   = ShaderManager.ReadFromAssetStream(path + "PM.fsh");

            shaderProgram = ShaderConstructor.CreateShader(vs, fs);
            CreateShader(shaderProgram);
        }
Example #4
0
        /*
         *      public byte SetFlags
         *      {
         *              set {
         *                      BitArray flags = new BitArray(new byte[] { value });
         *                      noCull = flags[0];
         *                      groundShadow = flags[1];
         *                      drawShadow = flags[2];
         *                      receiveShadow = flags[3];
         *                      hasEdge = flags[4];
         *                      vertexColour = flags[5];
         *                      pointDrawing = flags[6];
         *                      lineDrawing = flags[7];
         *              }
         *      }
         */

        private void CreateShader()
        {
            shaderProgram = ShaderConstructor.CreateShader(ShaderSettings);
            CreateShader(shaderProgram);
        }
Example #5
0
 private void CreateShader()
 {
     shaderProgram = ShaderConstructor.CreateShader(vs, fs);
     shaderProgram.ApplyShader();
     CreateShader(shaderProgram);
 }