- Timestamp:
- 10/06/08 17:39:30 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
r3005 r3009 38 38 { 39 39 float4 col: COLOR0; 40 //float4 pos: COLOR1; 41 float3 pos: COLOR1; 42 float4 norm: COLOR2; 40 float4 norm: COLOR1; 41 float3 pos: COLOR2; 43 42 }; 44 43 … … 113 112 pix.col.w = length(eyePos - IN.worldPos.xyz) * maxDepth / magView; 114 113 115 #if 1114 #if 0 116 115 // save world position in second render target 117 116 pix.pos = IN.worldPos.xyz * maxDepth; … … 145 144 //pix.col.w = glstate.material.emission.x; 146 145 147 // compute eye linear depth 146 // compute eye linear depth and scale with lenght to avoid sqr root in pixel shader 148 147 float2 screenCoord = projPos.xy * 0.5f + 0.5f; 149 148 const float magView = length(Interpol(screenCoord, bl, br, tl, tr)); 150 149 pix.col.w = length(eyePos - IN.worldPos.xyz) * maxDepth / magView; 151 150 152 #if 1151 #if 0 153 152 pix.pos = IN.worldPos.xyz * maxDepth; 154 153 #endif
Note: See TracChangeset
for help on using the changeset viewer.