Changeset 3157 for GTP


Ignore:
Timestamp:
11/24/08 18:02:20 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r3156 r3157  
    184184 
    185185        const float squaredLen = diffVec.x * diffVec.x + diffVec.y * diffVec.y + diffVec.z * diffVec.z; 
    186  
    187186        const float oldWeight = clamp(oldPixel.y, .0f, temporalCoherence); 
    188187        //const float oldWeight = oldPixel.y; 
     
    262261                const float3 sampleNormal = normalize(tex2Dlod(normalTex, float4(texcoord, 0, 0)).xyz); 
    263262 
    264                 numSamples += sampleColor.x; 
    265  
    266263 
    267264                //////////////// 
     
    292289                total_ao += cosAngle * aoContrib; 
    293290#endif 
     291                // check if the samples have been valid in the last frame 
     292                numSamples += (1.0f - step(1.0f, lengthToSample)) * sampleColor.x; 
    294293        } 
    295294 
     
    343342                const float3 samplePos = ReconstructSamplePos(sampleColor.w, texcoord, bl, br, tl, tr); 
    344343                 
    345                 numSamples += sampleColor.x; 
    346  
    347344 
    348345                //////////////// 
     
    371368                total_ao += cosAngle * aoContrib; 
    372369#endif 
     370 
     371                // check if the samples have been valid in the last frame 
     372                numSamples += (1.0f - step(1.0f, lengthToSample)) * sampleColor.x; 
    373373        } 
    374374 
Note: See TracChangeset for help on using the changeset viewer.