source: trunk/gui/vizservers/nanovis/shaders/vertex_std.cg @ 386

Last change on this file since 386 was 386, checked in by qiaow, 18 years ago

Added phone shading in one_volume.cg

File size: 911 bytes
Line 
1/*
2 * ======================================================================
3 *  AUTHOR:  Wei Qiao <qiaow@purdue.edu>
4 *           Purdue Rendering and Perceptualization Lab (PURPL)
5 *
6 *  Copyright (c) 2004-2006  Purdue Research Foundation
7 *
8 *  See the file "license.terms" for information on usage and
9 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10 * ======================================================================
11 */
12
13#include "common.cg"
14 
15v2f main(a2v IN,
16                uniform float4x4 modelViewProjMatrix,
17                uniform float4x4 modelViewInv)
18{
19        v2f OUT;
20
21        //clip space vertex position
22        OUT.HPosition = mul(modelViewProjMatrix, mul(modelViewInv, IN.Position));
23       
24        //eye space texture coordinates
25        OUT.TexCoord = IN.TexCoord;
26
27        //world space eye position
28        OUT.EyeVector = normalize(IN.Position.xyz - float3(0., 0., 0.));
29
30        return OUT;
31}
Note: See TracBrowser for help on using the repository browser.