Ignore:
Timestamp:
11/09/08 13:34:36 (16 years ago)
Author:
mattausch
Message:

worked on dynamic objects indexing not working yet

File:
1 edited

Legend:

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

    r3110 r3111  
    145145        float4 illum_col; 
    146146 
     147 
    147148        //////////// 
    148149        //-- dynamic objects 
    149150         
    150         float4x4 trafo; 
    151          
    152         if (id < 10)  
    153                 trafo = oldModelViewProj; 
    154         else  
    155                 trafo = inverseModelTrafo * oldModelViewProj; 
     151        //float4x4 trafo = (id < 10.0f) ? oldModelViewProj : mul(oldModelViewProj, inverseModelTrafo); 
     152        float4x4 trafo = mul(oldModelViewProj, inverseModelTrafo); 
    156153 
    157154        // compute translational portion 
    158155        const float3 translatedPt = worldPos.xyz - oldEyePos; 
     156 
    159157 
    160158        ///////////////// 
     
    167165        // fit from unit cube into 0 .. 1 
    168166        const float2 oldTexCoords = backProjPos.xy * 0.5f + 0.5f; 
    169          
    170167        // retrieve the sample from the last frame 
    171168        const float4 oldPixel = tex2Dlod(oldTex, float4(oldTexCoords, .0f, .0f)); 
     
    173170 
    174171#if USE_EYESPACE_DEPTH 
     172 
    175173        // calculate eye space position of sample in old frame 
    176174        const float oldEyeSpaceDepth = oldPixel.w; 
Note: See TracChangeset for help on using the changeset viewer.