# creating a simple cartoon like light effect

I could like to create a really simple light engine that does not eat to much CPU and will produce this effect:

I am using libgdx for my game with box 2D light (which is too heavy for my needs). I have no idea of what is the best solution to create this effect (shapeRenderer? pure shader?). For the moment I don't need any shadow casting, but I would like to be able to maintain multiple light sources and to add color to the light.

• Usually in theese situations you create a light map (a render target) that you fill with a default color (such as your ambient light) and then you render on it your lights. then when you render the sprites you multiply in the shader the color given by the texture by the color of the lights' render target, bound to the shader as a texture. This is just a comment and not an answer because actually I don't know how libgdx works, only DirectX – Liuka Dec 17 '16 at 11:19
• See also this similar question - in general, techniques used for fog of war will also be useful for this type of lighting effect. Just note that getting two overlapping bright areas to combine correctly may require rendering to an off-screen buffer first, before compositing the result over your scene. – DMGregory Dec 18 '16 at 17:13

GL20.GL_SRC_COLOR, GL20.GL_ZERO