W
W
wolf-98302015-01-26 20:42:24
Java
wolf-9830, 2015-01-26 20:42:24

How to implement fog?

How can I implement fog with libgdx in a 2D game? Can use textures with painted "flakes" of fog?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
naXa!, 2015-01-29
@naXa

Didn't work with libgdx, but I'll venture a few solutions:

  1. You can use a shader with the ColorAttribute.Fog attribute, as is done in FogTest.java .
  2. You can create a particle system for this. See the question Particle System for Clouds and Smoke on the stack. Since the game is 2D, just remove the movement on the third axis.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question