- Timestamp:
- 10/19/08 00:29:45 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
r3034 r3041 8 8 }; 9 9 10 10 11 // vtx output 11 12 struct vtxout 12 13 { 13 float4 position: POSITION; // eye space 14 14 float4 position: POSITION; 15 float4 texCoord: TEXCOORD0; 15 16 16 17 18 17 float4 color: COLOR0; 18 float4 eyePos: TEXCOORD1; // eye position 19 float3 normal: TEXCOORD2; 19 20 }; 20 21 … … 60 61 } 61 62 62 //#pragma position_invariant fragtex63 63 64 64 pixel fragtex(fragin IN, … … 78 78 // save world space normal in rt 79 79 pix.norm = IN.normal; 80 80 // compute eye linear depth 81 pix.col.w = length(IN.eyePos.xyz); 81 82 // hack: squeeze some information about ambient into the texture 82 83 //pix.col.w = glstate.material.emission.x; 83 84 // compute eye linear depth85 pix.col.w = length(IN.eyePos.xyz);86 84 87 85 return pix; … … 92 90 { 93 91 pixel pix; 94 95 92 // hack: use comination of emmisive + diffuse (emmisive used as constant ambient term) 96 93 pix.col = glstate.material.diffuse + glstate.material.emission; 97 94 // save world space normal in rt 98 95 pix.norm = IN.normal; 99 96 // eye space depth 100 97 pix.col.w = length(IN.eyePos.xyz); 101 102 98 // hack: squeeze some information about the ambient term into the target 103 99 //pix.col.w = glstate.material.emission.x;
Note: See TracChangeset
for help on using the changeset viewer.