| View previous topic :: View next topic |
| Author |
Message |
Rado1

Joined: 05 May 2010 Posts: 20
|
Posted: Thu Jul 15, 2010 5:56 pm Post subject: Psycho effect |
|
|
A simple "psychedelic" lava/plasma-like effect. Can also be used as a screensaver.
P.S. I tried to find the simplest way how to achieve the desired effect without time-consuming recalculation of a large bitmap; I think usage of constant-size RenderNet is not a bad idea...
| Description: |
|
 Download |
| Filename: |
psycho.zip |
| Filesize: |
50.45 KB |
| Downloaded: |
18 Time(s) |
|
|
| Back to top |
|
 |
Kjell

Joined: 23 Feb 2008 Posts: 854
|
|
| Back to top |
|
 |
VilleK Site Admin

Joined: 15 Jan 2007 Posts: 962 Location: Stockholm, Sweden
|
Posted: Thu Jul 15, 2010 7:00 pm Post subject: |
|
|
Kjell, I had to add ".x" in the line below for the fragment shader:
float z = texture2D(tex1, gl_TexCoord[0].xy).x;
Both examples look good, the one by Rado1 takes up a lot of cpu. Kjells example is cpu friendly but then you have to deal with GPU-incompatibilities instead.
|
|
| Back to top |
|
 |
Kjell

Joined: 23 Feb 2008 Posts: 854
|
Posted: Thu Jul 15, 2010 7:06 pm Post subject: |
|
|
d'oh,
Thanks Ville ~ Stupid forgiving NVIDIA drivers
*Updated Plasma.zgeproj in my previous post with the fix.
K
|
|
| Back to top |
|
 |
Rado1

Joined: 05 May 2010 Posts: 20
|
Posted: Sat Jul 17, 2010 1:50 pm Post subject: |
|
|
Yes you are right, updating 80.000 triangles every frame is not very cheap of course. I stupidly used it just for zooming the picture out, just to make the effect more "attractive". The lava effect by itself has almost no CPU footprint; see the attached version.
Is there any way how to achieve zooming out effect with shaders without too large texture bitmap (e.g., it is fully computed by shader)? I heard that computation of Perlin noise is very expensive also in GLSL.
| Description: |
|
 Download |
| Filename: |
psycho_simple.zgeproj |
| Filesize: |
1.56 KB |
| Downloaded: |
12 Time(s) |
|
|
| Back to top |
|
 |
Kjell

Joined: 23 Feb 2008 Posts: 854
|
Posted: Sat Jul 17, 2010 2:29 pm Post subject: |
|
|
Hi Rado1,
Hmm .. psycho_simple.zgeproj still uses 80K polygons?
Anyway, doing ( perlin ) noise in GLSL isn't all that bad .. but if you can fake it, fake it Expensive effects such as ambient occlusion generally use a noise texture to sample from as well.
K
|
|
| Back to top |
|
 |
|