Changeset 2997 for GTP/trunk


Ignore:
Timestamp:
10/03/08 10:09:24 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp

    r2995 r2997  
    657657        cgGLSetMatrixParameterfc(sOldModelViewProjMatrixParam, (const float *)oldProjViewMatrix.x); 
    658658 
    659         cgGLSetMatrixParameterfc(sModelViewProjMatrixParam, (const float *)projViewMatrix.x); 
    660  
    661659        GLuint colorsTex = fbo->GetColorBuffer(colorBufferIdx)->GetTexture(); 
    662660        GLuint positionsTex = fbo->GetColorBuffer(1)->GetTexture(); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r2995 r2997  
    11941194 
    11951195                ShadowMap *sm = showShadowMap ? shadowMap : NULL; 
    1196                 //ssaoShader->Render(fbo, oldViewProjMatrix, matProjectionView, ssaoTempCohFactor, light, useHDR, sm); 
    1197                 ssaoShader->Render(fbo, oldViewProjMatrix, oldMatViewing, ssaoTempCohFactor, light, useHDR, sm); 
     1196                ssaoShader->Render(fbo, oldViewProjMatrix, matProjectionView, ssaoTempCohFactor, light, useHDR, sm); 
    11981197        } 
    11991198 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r2996 r2997  
    149149                   uniform float3 br, 
    150150                   uniform float3 tl, 
    151                    uniform float3 tr, 
    152                    const uniform float4x4 oldModelView 
     151                   uniform float3 tr 
    153152                   ) 
    154153{ 
     
    163162        float w = norm.w; 
    164163 
    165 #if 1    
    166164        // the current world position 
    167165        const float4 centerPosition = tex2D(positions, IN.texCoord.xy); 
     166 
     167#if 1    
    168168        const float2 ao = ssao(IN, positions, noiseTexture, samples, normal, centerPosition, w, eyePos, bl, br, tl, tr); 
    169169 
    170170#else 
    171171        /// reconstruct position from the eye space depth 
    172         float3 viewDir = normalize(IN.view); 
     172/*      float3 viewDir = normalize(IN.view); 
    173173        const float eyeDepth = tex2D(colors, IN.texCoord.xy).w; 
    174174        float4 centerPosition; 
     175 
    175176        centerPosition.xyz = eyePos - viewDir * eyeDepth; 
    176  
     177*/ 
    177178        const float2 ao = ssao(IN, colors, noiseTexture, samples, normal, centerPosition, w, eyePos, bl, br, tl, tr); 
    178179 
     
    194195         
    195196        // note: could be done using eye space depth values  
    196         // by storing the position from last frame and the old model view matrix 
    197  
    198         //float4 oldPos = mul(oldModelViewProj, realPos); 
    199197        float4 oldPos = mul(oldModelViewProj, realPos); 
    200198 
    201         //const float projEyeDepth = 
    202199        // the current depth projected into the old frame 
    203200        const float projDepth = oldPos.z / oldPos.w; 
Note: See TracChangeset for help on using the changeset viewer.