Changeset 2925 for trunk


Ignore:
Timestamp:
Apr 1, 2012 11:00:40 PM (12 years ago)
Author:
ldelgass
Message:

use vector math ops in render_vel.cg

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/nanovis/shaders/render_vel.cg

    r2852 r2925  
    2121            uniform float vmax) : COLOR
    2222{
    23     float3 ret;
    24 
    2523    //float4 vel = float4(tex3D(vel_tex, uvw).xyz, 0) - float4(0.5, 0.5, 0.5, 0.0);
    2624    float4 vel = float4(tex3D(vel_tex, uvw).yzw, 0) - float4(0.5, 0.5, 0.5, 0.0);
    27     vel.x = vel.x * (vmax * 2);
    28     vel.y = vel.y * (vmax * 2);
    29     vel.z = vel.z * (vmax * 2);
    30     ret.x = plane_normal.x * vel.x * 0.0005;
    31     ret.y = plane_normal.y * vel.y * 0.0005;
    32     ret.z = plane_normal.z * vel.z * 0.0005;
     25    vel = vel * (vmax * 2);
     26    float4 ret = plane_normal * vel * 0.0005;
    3327
    34     return float4(ret, 1);
     28    return float4(ret.xyz, 1);
    3529}
    3630
Note: See TracChangeset for help on using the changeset viewer.