Ignore:
Timestamp:
10/16/08 19:51:16 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r3028 r3034  
    159159        const float eyeDepth = tex2Dlod(colors, float4(IN.texCoord, 0, 0)).w; 
    160160        const float3 eyeSpacePos = -viewDir * eyeDepth; 
    161         const float3 centerPosition = eyePos + eyeSpacePos; 
    162  
    163         const float4 realPos = float4(centerPosition, 1.0f); 
     161        const float4 worldPos = float4(eyePos + eyeSpacePos, 1.0f); 
    164162 
    165163 
     
    167165        //-- calculcate the current projected depth for next frame 
    168166         
    169         float4 currentPos = mul(modelViewProj, realPos); 
     167        float4 currentPos = mul(modelViewProj, worldPos); 
    170168         
    171169        const float w = SAMPLE_RADIUS / currentPos.w; 
     
    185183         
    186184        // calculate projected depth 
    187         float4 projPos = mul(oldModelViewProj, realPos); 
     185        float4 projPos = mul(oldModelViewProj, worldPos); 
    188186        projPos /= projPos.w; 
    189  
     187         
    190188        // the current depth projected into the old frame 
    191189        const float projDepth = projPos.z * precisionScale; 
Note: See TracChangeset for help on using the changeset viewer.