source: branches/blt4/packages/vizservers/nanovis/shaders/render_vel.cg @ 2936

Last change on this file since 2936 was 2936, checked in by gah, 13 years ago

sync back with trunk

File size: 1021 bytes
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * ======================================================================
4 *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
5 *           Purdue Rendering and Perceptualization Lab (PURPL)
6 *
7 *  Copyright (c) 2004-2006  Purdue Research Foundation
8 *
9 *  See the file "license.terms" for information on usage and
10 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 * ======================================================================
12 */
13
14// update positions based on velocity
15
16#include "common.cg"
17
18float4 main(in float3 uvw : TEXCOORD0,
19            uniform sampler3D vel_tex,
20            uniform float4 plane_normal,
21            uniform float vmax) : COLOR
22{
23    //float4 vel = float4(tex3D(vel_tex, uvw).xyz, 0) - float4(0.5, 0.5, 0.5, 0.0);
24    float4 vel = float4(tex3D(vel_tex, uvw).yzw, 0) - float4(0.5, 0.5, 0.5, 0.0);
25    vel = vel * (vmax * 2);
26    float4 ret = plane_normal * vel * 0.0005;
27
28    return float4(ret.xyz, 1);
29}
30
Note: See TracBrowser for help on using the repository browser.