Ignore:
Timestamp:
02/23/09 18:33:26 (15 years ago)
Author:
mattausch
Message:

strange texture error!!

File:
1 edited

Legend:

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

    r3325 r3326  
    273273                // to the current pixel or if the angle is small enough 
    274274                // to have any influence in the current or last frame 
    275 #if 1 
     275#if 0 
    276276                const float tooFarAway = step(0.5f, lengthToSample - changeFactor); 
    277277 
     
    281281                else 
    282282                        validSamples = max(validSamples, pixelValid); 
    283 #else 
    284                 validSamples = max(validSamples, pixelValid); 
    285283#endif 
    286284 
     
    408406                // or if the angle is small enough 
    409407                // to have any influence in the current or last frame 
    410 #if 1 
     408#if 0 
    411409                const float partlyResetThres = 1.0f; 
    412410 
     
    416414                else 
    417415                        validSamples = max(validSamples, pixelValid); 
    418 #else 
    419                 validSamples = max(validSamples, pixelValid); 
    420416#endif 
    421417 
     
    523519        if (eyeSpaceDepth < DEPTH_THRESHOLD) 
    524520        { 
    525                 //ao = ssao(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, isMovingObject); 
    526                 ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, isMovingObject, normals, oldIdx); 
     521                if (0) 
     522                        ao = ssao(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, isMovingObject); 
     523                else 
     524                        ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor,  
     525                                   bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity,  
     526                                           isMovingObject, normals, oldIdx); 
    527527        } 
    528528        else 
     
    545545         
    546546        // don't check for moving objects, otherwise almost no coherence 
    547         if (!isMovingObject) 
     547        /*if (!isMovingObject) 
    548548        { 
    549549                if (ao.y > completelyResetThres)  
     
    558558                        oldIdx = .0f; 
    559559                } 
    560         } 
     560        }*/ 
     561 
    561562 
    562563        ////////// 
     
    573574        OUT.illum_col.w = eyeSpaceDepth; 
    574575 
    575         // can be used to check if this pixel belongs to a moving object 
     576        // this value can be used to check if this pixel belongs to a moving object 
    576577        OUT.col.x = SqrLen(diffVec); 
    577578        //OUT.illum_col.z = SqrLen(diffVec); 
    578          
     579 
     580        OUT.illum_col.xyz = normal.xyz; 
    579581        return OUT; 
    580582} 
Note: See TracChangeset for help on using the changeset viewer.