public static Shader CreateShader(ShaderSettings settings) { var constructor = new ShaderConstructor(settings); constructor.GenerateVertex(); constructor.GenerateFragment(); return(constructor.Creator()); }
public static Shader CreateShader(string vs, string fs) { var constructor = new ShaderConstructor(); constructor.rawVertex = vs; constructor.rawFragment = fs; return(constructor.Creator()); }
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); }
/* * 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); }
private void CreateShader() { shaderProgram = ShaderConstructor.CreateShader(vs, fs); shaderProgram.ApplyShader(); CreateShader(shaderProgram); }