title: Textures and no textures at the same time in metal, with multiply blending
body: <p>I'm drawing 2 different vertex buffers in metal, one with a texture (ignoring vertex color data) and the other without a texture (drawing purely the vertex color data):</p>
  
  <pre><code>let commandBuffer = self.commandQueue.makeCommandBuffer()
  let commandEncoder = commandBuffer.makeRenderCommandEncoder(descriptor: rpd)
  
  //render first buffer with texture
  commandEncoder.setRenderPipelineState(self.rps)
  commandEncoder.setVertexBuffer(self.vertexBuffer1, offset: 0, at: 0)
  commandEncoder.setVertexBuffer(self.uniformBuffer, offset: 0, at: 1)
  commandEncoder.setFragmentTexture(self.texture, at: 0)
  commandEncoder.setFragmentSamplerState(self.samplerState, at: 0)
  commandEncoder.drawPrimitives(type: .triangle, vertexStart: 0, vertexCount: count1, instanceCount: 1)
  
  
  //render second buffer without texture
  commandEncoder.setRenderPipelineState(self.rps)
  commandEncoder.setVertexBuffer(self.vertexBuffer2, offset: 0, at: 0)
  commandEncoder.setVertexBuffer(self.uniformBuffer, offset: 0, at: 1)
  commandEncoder.setFragmentTexture(nil, at: 0)
  commandEncoder.drawPrimitives(type: .triangle, vertexStart: 0, vertexCount: count2, instanceCount: 1)
  
  commandEncoder.endEncoding()
  commandBuffer.present(drawable)
  commandBuffer.commit()
  </code></pre>
  
  <p>The shader looks like this:</p>
  
  <pre><code>#include &lt;metal_stdlib&gt;
  using namespace metal;
  
  struct Vertex {
      float4 position [[position]];
      float4 color;
      float4 texCoord;
  };
  
  struct Uniforms {
      float4x4 modelMatrix;
  };
  
  vertex Vertex vertex_func(constant Vertex *vertices [[buffer(0)]],
                            constant Uniforms &amp;uniforms [[buffer(1)]],
                            uint vid [[vertex_id]])
  {
      float4x4 matrix = uniforms.modelMatrix;
      Vertex in = vertices[vid];
      Vertex out;
      out.position = matrix * float4(in.position);
      out.color = in.color;
      out.texCoord = in.texCoord;
      return out;
  }
  
  fragment float4 fragment_func(Vertex vert [[stage_in]],
                                 texture2d&lt;float&gt;  tex2D     [[ texture(0) ]],
                                 sampler           sampler2D [[ sampler(0) ]]) {
  
      if (vert.color[0] == 0 &amp;&amp; vert.color[1] == 0 &amp;&amp; vert.color[2] == 0) {
          //texture color
          return tex2D.sample(sampler2D, float2(vert.texCoord[0],vert.texCoord[1]));
      }
      else {
          //color color
          return vert.color;
      }
  
  }
  </code></pre>
  
  <p>Is this there a better way of doing this? Any vertex that i want to use the texture i'm setting to black, and the shader checks to see if the color is black, and if so then use the texture, otherwise use the color.</p>
  
  <p>Also, is there a way to blend the colored polys and textured polys together using a multiply function if they overlap on the screen? It seems like MTLBlendOperation only has options for add/subtract/min/max, no multiply?</p>