Created
October 17, 2013 06:57
-
-
Save mortennobel/7020252 to your computer and use it in GitHub Desktop.
plasma effect (from Unity's RenderingPluginExample42)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple oldskool "plasma effect", a bunch of combined sine waves | |
// input x,y (uv-coordinates), t (time) | |
int vv = int( | |
(127.0f + (127.0f * sinf(x/7.0f+t))) + | |
(127.0f + (127.0f * sinf(y/5.0f-t))) + | |
(127.0f + (127.0f * sinf((x+y)/6.0f-t))) + | |
(127.0f + (127.0f * sinf(sqrtf(float(x*x + y*y))/4.0f-t))) | |
) / 4; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment