Create Lightning in OpenGL ES 1.1

I need to create a beautiful zipper using OpenGL ES 1.1 (iPhone), and planned to use shaders. However, when I asked about this in a previous question ( OpenGL ES 1.x Shaders ), I was informed that this is probably not an option on the iPhone.

So now I'm back in first place, reflecting on how I can make lightning-fast animations. No need to look super-realistic. I have already tried using things similar to triangles. Although this method does work, it is not as good as I hoped it would look.

Does anyone have any ideas on this?

Thanks again,
~ Eric

+4
source share
5 answers

The usual approach is to calculate the lightning path using the Perlin function, turning it into a glow bay, creating a beautiful blur using a Gaussian blur shader, and then combining it with your scene.

+2
source

Try a triangular strip textured with a gradient from black to low saturation of blue or purple to white. Set blending to additive (GL_SRC_ALPHA, GL_ONE).

+4
source

Perhaps you can adapt the code from this project . Although it is not ObjC / C, it uses OpenGL.

Here is an article that describes the effect in more detail and provides an implementation of VB / DirectX.

+2
source

Maybe something is missing for me, but what's wrong with glLight() and fixed functionality like everyone else?

0
source

There must be a very bright light so that it looks like lightning, and you do not need to shine a light or something like that?

0
source

All Articles