- Timestamp:
- 07/07/08 10:52:03 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
r2813 r2818 41 41 42 42 43 vtxout vtx(vtxin IN, uniform float4x4 ModelViewProj) 43 vtxout vtx(vtxin IN, 44 const uniform float4x4 ModelViewProj, 45 uniform float4x4 ModelMatrix) 44 46 { 45 47 vtxout OUT; 46 48 47 49 // transform the vertex position into eye space 48 OUT.position = mul(ModelViewProj, IN.position);49 50 50 OUT.color = IN.color; 51 51 52 52 OUT.texCoord = IN.texCoord; 53 OUT.worldPos = mul(ModelMatrix, IN.position); 54 55 // transform the vertex position into eye space 56 OUT.position = mul(ModelViewProj, OUT.worldPos); 57 53 58 OUT.worldPos = IN.position; 54 // eye pos with linear depth 55 //OUT.worldPos = OUT.position; 59 56 60 OUT.normal = IN.normal; 57 61 … … 66 70 pix.col = tex2D(tex, IN.texCoord.xy); 67 71 pix.pos = IN.worldPos * maxDepth; 72 pix.norm = IN.normal; 68 73 pix.pos.w = IN.projPos.w; 69 pix.norm = IN.normal;70 74 71 75 return pix;
Note: See TracChangeset
for help on using the changeset viewer.