title: Writing raw data to texture using GLSL, lwjgl
body: <p>currently, I need the fragment shader to write to a texture(which it does), but rather than overwriting, it blends. Here is the fragment shader itself</p>
  <pre><code>#version 400 core
  
  in vec2 pass_textureCoordinates;
  
  out vec4 out_Color;
  layout(location = 1) out vec4 out_location0;
  
  uniform sampler2D modelTexture;
  uniform sampler2D bumpTexture;
  
  uniform sampler2D overlayTexture;
  uniform sampler2D scratchLevels;
  
  void main(void)
  {
      vec2 txt = pass_textureCoordinates;
      vec4 base = texture(overlayTexture,txt);
      vec4 over = texture(modelTexture,txt);
      
      float baseA = base[3] * (1.0f - over[3]);
      float overA = over[3];
      float finalA = base[3] + (1.0f - base[3]) * overA;
      if(finalA == 0)
      {
          out_Color[0] = 0;
          out_Color[1] = 0;
          out_Color[2] = 0;
      }
      else
      {
          out_Color[0] = (base[0] * baseA + over[0] * overA) / finalA;
          out_Color[1] = (base[1] * baseA + over[1] * overA) / finalA;
          out_Color[2] = (base[2] * baseA + over[2] * overA) / finalA;
      }
      out_Color[3] = finalA; 
      out_location0 = out_Color;
  }
  </code></pre>
  <p>How can I write to the texture with out blending?</p>
  <p>Edit: I need to overwrite the alpha channel as well</p>