title: LibGDX - Basic 2D lighting, don't know what to do
body: <p>It's my first time attempting to create a basic light system that uses a black texture with a white circle on top. I read various threads about the issue but I just don't know what I am doing wrong.</p>
  
  <p>What I want is the ambient to be dark and the light to be well white but changing the spritebatch color to something darker will cause the light to be darker to EVEN if I reset the color when drawing the light texture</p>
  
  <p>So this is what I want (did this by forcing the light texture draw 5 times but that isn't a solution, it's an hack):
  <a href="https://i.stack.imgur.com/DXwJm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DXwJm.png" alt="what I get if I draw the light 5 times while darkening the screen"></a></p>
  
  <p>This is what I get (only 1 light texture is drawn but isn't very visible):
  <a href="https://i.stack.imgur.com/RnqTm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RnqTm.png" alt="what I get while darkening the spritebatch and resetting the color to draw the light"></a></p>
  
  <p>This is what I get without darkening the spritebatch: 
  <a href="https://i.stack.imgur.com/TLxML.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TLxML.png" alt="what I get by drawing the light without darkening the spritebatch"></a></p>
  
  <p>Main code:      </p>
  
  <pre><code>Game.sb.begin();
  //Make stuff darker
  Game.sb.setColor(0.1f, 0.1f, 0.1f,1f);
  sb.setBlendFunction(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
  lvl.render();
  //Reset color
  Game.sb.setColor(1f, 1f, 1f,1f);
  sb.setBlendFunction(GL20.GL_DST_COLOR, GL20.GL_SRC_ALPHA);
  //This draws all lights by drawing a texture with the above blending function
  lightM.render();
  Game.sb.end(); 
  </code></pre>
  
  <p>Light object draw method:</p>
  
  <pre><code>Game.sb.setColor(c.r,c.b,c.g, 1f);
  Utils.drawTexture(Assets.get("sprites/lightcircle2.png", Texture.class), pos, size, true);
  Game.sb.setColor(1,1,1,1);
  </code></pre>
  
  <p>Am I making some kind of error with the setcolor? I been considering using a FrameBuffer but I am not sure if it will give me the light effect I want</p>
  
  <p>By the way this is my light texture (it's CC0):</p>
  
  <p><a href="https://i.stack.imgur.com/nRmVV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nRmVV.png" alt="lighttexture"></a></p>