Jump to content

Soft particles


AggrorJorn
 Share

Recommended Posts

Perhaps you could program it yourself ?

 

uniform sampler2D colorMap;

02 uniform sampler2D depthMap;

03

04 varying float depth;

05

06 void main() {

07

08 vec2 coord = gl_FragCoord.xy / vec2(640,360);

09 vec4 depthMapDepth = -texture2D(depthMap, coord).z;

10 vec4 color = texture2D(colorMap, gl_TexCoord[0].st);

11

12 float scale = 0.2f;

13 float fade = clamp((depthMapDepth.x-depth)*scale, 0.0, 1.0);

14

15 gl_FragColor = vec4(vec3(color),color.a * fade); 16 }

 

Source :

 

http://www.informatik.uni-oldenburg.de/~trigger/page7.html

Stop toying and make games

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...