<p>By the plasma effect I mean an animation that looks like this:</p>
<p><a href="https://i.sstatic.net/r8Hfg.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/r8Hfg.gif" alt="enter image description here" /></a></p>
<p>I have seen some codes, like these</p>
<p><a href="https://www.shadertoy.com/view/Xst3zN" rel="nofollow noreferrer">https://www.shadertoy.com/view/Xst3zN</a></p>
<p><a href="https://www.shadertoy.com/view/4tdGWX" rel="nofollow noreferrer">https://www.shadertoy.com/view/4tdGWX</a></p>
<p>and messed with the code to try to grasp it, but I'm not understanding what is going on, for example, if there's a main math concept behind it that makes the effect possible, or a shader technique that I don't know about.</p>

CC BY-SA 4.0
2022-10-29T21:23:51.650Z
There is very nice intro/discussion on the topic here: https://thebookofshaders.com/13/
pmw1234
CC BY-SA 4.0
2022-11-15T06:04:54.163Z
Looks like each point on a grid has an oscillating texture coordinate (just one), which is interpolated and used to lookup a colour in a 1D gradient texture. Also the grid is shifting to the left. As far as plasma effects go, this one isn't even very plasma-y.
Criticize SE actions means ban
<shader><glsl><color><fragment-shader><2d-graphics>
What are the main concepts behind building the plasma effect with GSLS?
Jonas
# What are the main concepts behind building the plasma effect with GSLS?

(Asked by: username_0 on 2022-10-29)

By the plasma effect I mean an animation that looks like this:

[![enter image description here](https://i.sstatic.net/r8Hfg.gif)](https://i.sstatic.net/r8Hfg.gif)

I have seen some codes, like these

<https://www.shadertoy.com/view/Xst3zN>

<https://www.shadertoy.com/view/4tdGWX>

and messed with the code to try to grasp it, but I'm not understanding what is going on, for example, if there's a main math concept behind it that makes the effect possible, or a shader technique that I don't know about.

**Tags:** shader, glsl, color, fragment-shader, 2d-graphics

> **Comments:**
> **username_1**: There is very nice intro/discussion on the topic here: https://thebookofshaders.com/13/  
> **username_2**: Looks like each point on a grid has an oscillating texture coordinate (just one), which is interpolated and used to lookup a colour in a 1D gradient texture. Also the grid is shifting to the left. As far as plasma effects go, this one isn't even very plasma-y.  

---

## 0 answers

