- Timestamp:
- 02/17/09 19:21:52 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3314 r3316 48 48 weight of the pixel in the new frame. 49 49 */ 50 inline float2 temporalSmoothing(float4 worldPos,50 inline float2 Reproject(float4 worldPos, 51 51 float eyeSpaceDepth, 52 52 float2 texcoord0, … … 107 107 { 108 108 // pixel valid => retrieve the convergence weight 109 w = oldPixel.y; 109 float w1 = tex2Dlod(oldTex, float4(oldTexCoords + float2(0.5f / 1024.0f, 0), .0f, .0f)).y; 110 float w2 = tex2Dlod(oldTex, float4(oldTexCoords - float2(0.5f / 1024.0f, 0), .0f, .0f)).y; 111 float w3 = tex2Dlod(oldTex, float4(oldTexCoords + float2(0, 0.5f / 768.0f), .0f, .0f)).y; 112 float w4 = tex2Dlod(oldTex, float4(oldTexCoords - float2(0, 0.5f / 768.0f), .0f, .0f)).y; 113 114 w = min(min(w1, w2), min(w3, w4)); 115 //w = oldPixel.y; 110 116 } 111 117 else … … 385 391 //-- compute temporal reprojection 386 392 387 float2 temporalVals = temporalSmoothing(eyeSpacePos, eyeSpaceDepth, IN.texCoord, oldEyePos,388 389 390 391 392 393 394 393 float2 temporalVals = Reproject(eyeSpacePos, eyeSpaceDepth, IN.texCoord, oldEyePos, 394 oldTex, oldModelViewProj, 395 colors, 396 projPos.xyz, 397 invw, 398 oldbl, oldbr, oldtl, oldtr, 399 diffVec 400 ); 395 401 396 402 const float oldSsao = temporalVals.x;
Note: See TracChangeset
for help on using the changeset viewer.