Ignore:
Timestamp:
02/17/09 19:21:52 (15 years ago)
Author:
mattausch
Message:

surpressed blur, worked on object placing in sibenik (why performance worse than vienna??)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r3314 r3316  
    4848        weight of the pixel in the new frame. 
    4949*/ 
    50 inline float2 temporalSmoothing(float4 worldPos, 
     50inline float2 Reproject(float4 worldPos, 
    5151                                                                float eyeSpaceDepth, 
    5252                                                                float2 texcoord0, 
     
    107107        { 
    108108                // 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; 
    110116        } 
    111117        else 
     
    385391        //-- compute temporal reprojection 
    386392 
    387         float2 temporalVals = temporalSmoothing(eyeSpacePos, eyeSpaceDepth, IN.texCoord, oldEyePos, 
    388                                                 oldTex, oldModelViewProj,  
    389                                                                                         colors,  
    390                                                                                         projPos.xyz,  
    391                                                                                         invw,  
    392                                                                                         oldbl, oldbr, oldtl, oldtr, 
    393                                                                                         diffVec 
    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                                                                        ); 
    395401 
    396402        const float oldSsao = temporalVals.x; 
Note: See TracChangeset for help on using the changeset viewer.