public Shader(string shaderFileName, InputElement[] inputElements, string vertexShaderEntryPoint = "VSMain", string pixelShaderEntryPoint = "PSMain", Constructor constructor = null) { if (constructor == null) { constructor = Game.GameInstance.GameConstructor; } var vertexShaderCompileResult = constructor.CompileVertexShader(shaderFileName, vertexShaderEntryPoint, inputElements); VertexShader = vertexShaderCompileResult.Item1; InputLayout = vertexShaderCompileResult.Item2; PixelShader = constructor.CompilePixelShader(shaderFileName, pixelShaderEntryPoint); }