Ignore:
Timestamp:
May 2, 2015 3:19:17 AM (9 years ago)
Author:
ldelgass
Message:

Hand merge fix for flow reset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nanovis/branches/1.2/shaders/update_pos.cg

    r4904 r5397  
    2424    float time = pos.w;
    2525
     26    if (max > 0) {
    2627#ifdef EXPIRE
    27     time -= timestep;
     28        time -= timestep;
    2829
    29     // Lifetime ended?
    30     if (time < 0) {
    31         return texRECT(init_pos_tex, uv);
     30        // Lifetime ended?
     31        if (time < 0) {
     32            return texRECT(init_pos_tex, uv);
     33        }
     34#endif
     35        //reconstruct negative value
     36        float4 vel = float4(tex3D(vel_tex, pos.xyz).yzw, 0.0) * 2.0 - float4(1.0, 1.0, 1.0, 0.0);
     37        vel = vel * max;
     38        //vel *= float4(scale, 1);
     39        ret = pos + (vel * timestep);
     40    } else {
     41        ret = pos;
    3242    }
    33 #endif
    34 
    35     //reconstruct negative value
    36     float4 vel = float4(tex3D(vel_tex, pos.xyz).yzw, 0.0) * 2.0 - float4(1.0, 1.0, 1.0, 0.0f);
    37     vel = vel * max;
    38     //vel *= float4(scale, 1);
    39     ret = pos + (vel * timestep);
    4043
    4144    //not drawing if the particle is out of bound
Note: See TracChangeset for help on using the changeset viewer.