Changeset 3108


Ignore:
Timestamp:
11/07/08 01:48:44 (16 years ago)
Author:
mattausch
Message:

eyespacedepth working at home computer

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

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h

    r3107 r3108  
    1717 
    1818//#define DISTANCE_SCALE 1e-1f 
    19 #define DISTANCE_SCALE 5e-2f 
     19#define DISTANCE_SCALE 1e-2f 
    2020//#define DISTANCE_SCALE 0.2f 
    2121 
     
    2929//-- reprojection 
    3030 
    31 #define MIN_DEPTH_DIFF 1e-2f 
     31#define MIN_DEPTH_DIFF 5e-2f 
    3232#define PRECISION_SCALE 1e-1f 
    3333 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r3107 r3108  
    172172        const float3 viewVec = Interpol(oldTexCoords, oldbl, oldbr, oldtl, oldtr); 
    173173        const float invlen = 1.0f / length(viewVec); 
    174         const float projectedEyeSpaceDepth = length(translatedPt) * invlen; 
     174        const float projectedEyeSpaceDepth = invlen * length(translatedPt); 
    175175         
    176176        //const float depthDif = abs(oldEyeSpaceDepth - projectedEyeSpaceDepth); 
    177         //const float depthDif = abs(oldEyeSpaceDepth - projectedEyeSpaceDepth) / projectedEyeSpaceDepth; 
    178         const float depthDif = abs(1.0f - oldEyeSpaceDepth / projectedEyeSpaceDepth); 
     177        //const float depthDif = abs(1.0f - oldEyeSpaceDepth / projectedEyeSpaceDepth); 
     178 
     179        const float depthDif = abs(projectedEyeSpaceDepth - oldEyeSpaceDepth ) / projectedEyeSpaceDepth; 
    179180 
    180181#else 
Note: See TracChangeset for help on using the changeset viewer.