Changeset 2890 for GTP/trunk


Ignore:
Timestamp:
08/31/08 17:18:37 (16 years ago)
Author:
mattausch
Message:

view vector interpolation finally working

Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
3 edited

Legend:

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

    r2889 r2890  
    186186        const Vector3 fc = mPosition + view * z_far;  
    187187         
    188         const Vector3 up = -GetUpVector(); 
    189         const Vector3 right = -GetRightVector(); 
     188        const Vector3 up = GetUpVector(); 
     189        const Vector3 right = GetRightVector(); 
    190190 
    191191        Vector3 t1, t2; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SsaoShader.cpp

    r2889 r2890  
    551551        glTexCoord2f(0, 1); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, bl.x, bl.y, bl.z); glVertex3f(-new_offs,  new_offs, -0.5f); 
    552552*/ 
    553         glTexCoord2f(0, 0); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, tr.x, tr.y, tr.z); glVertex3f(-new_offs, -new_offs, -0.5f); 
    554         glTexCoord2f(1, 0); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, tl.x, tl.y, tl.z); glVertex3f( new_offs, -new_offs, -0.5f); 
    555         glTexCoord2f(1, 1); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, bl.x, bl.y, bl.z); glVertex3f( new_offs,  new_offs, -0.5f); 
    556         glTexCoord2f(0, 1); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, br.x, br.y, br.z); glVertex3f(-new_offs,  new_offs, -0.5f); 
     553        glTexCoord2f(0, 0); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, bl.x, bl.y, bl.z); glVertex3f(-new_offs, -new_offs, -0.5f); 
     554        glTexCoord2f(1, 0); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, br.x, br.y, br.z); glVertex3f( new_offs, -new_offs, -0.5f); 
     555        glTexCoord2f(1, 1); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, tr.x, tr.y, tr.z); glVertex3f( new_offs,  new_offs, -0.5f); 
     556        glTexCoord2f(0, 1); glMultiTexCoord3fARB(GL_TEXTURE1_ARB, tl.x, tl.y, tl.z); glVertex3f(-new_offs,  new_offs, -0.5f); 
    557557 
    558558        glEnd(); 
     
    577577        mCamera->ComputePoints(ftl, ftr, fbl, fbr, ntl, ntr, nbl, nbr); 
    578578 
    579 #if 1 
    580          
    581579        bl = Normalize(nbl - fbl); 
    582580        br = Normalize(nbr - fbr); 
    583581        tl = Normalize(ntl - ftl); 
    584582        tr = Normalize(ntr - ftr); 
    585  
    586 #else // just take camera direction 
    587          
    588         bl = -Normalize(mCamera->GetDirection()); 
    589         br = -Normalize(mCamera->GetDirection()); 
    590         tl = -Normalize(mCamera->GetDirection()); 
    591         tr = -Normalize(mCamera->GetDirection()); 
    592  
    593 #endif 
    594  
    595         // pack into 0 .. 1 
    596         /*bl = bl * 0.5f + 0.5f; 
    597         br = br * 0.5f + 0.5f; 
    598         tl = tl * 0.5f + 0.5f; 
    599         tr = tr * 0.5f + 0.5f;*/ 
    600583} 
    601584 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r2889 r2890  
    9494        } 
    9595 
    96         //return max(0.0f, 1.0f - total_ao); 
    97         return saturate(dot(currentViewDir, currentNormal)); 
     96        return max(0.0f, 1.0f - total_ao); 
     97        //return saturate(dot(currentViewDir, currentNormal)); 
    9898} 
    9999 
     
    125125        /// the current view direction 
    126126        //float3 viewDir = normalize(IN.view * 2.0f - float3(1.0f)); 
    127         float3 viewDir = IN.view; 
     127        float3 viewDir = normalize(IN.view); 
    128128 
    129129        // the current world position 
Note: See TracChangeset for help on using the changeset viewer.