Changeset 3330 for GTP


Ignore:
Timestamp:
02/27/09 16:53:18 (15 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r3329 r3330  
    250250                 
    251251                // angle between current normal and direction to sample controls AO intensity. 
    252                 const float cosAngle2 = dot(-dirSample, sampleNormal); 
    253                  
     252                //const float cosAngle2 = dot(-dirSample, sampleNormal); 
     253                const float cosAngle2 = .5f + dot(sampleNormal, -normal) * 0.5f; 
     254 
    254255                dirSample *= minDist; 
    255256                const float aoContrib = sampleIntensity * sampleWeight; 
     
    524525        if (eyeSpaceDepth < DEPTH_THRESHOLD) 
    525526        { 
    526                 if (1) 
     527                if (0) 
    527528                { 
    528529                        ao = ssao(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz,  
     
    533534                { 
    534535                        ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor,  
    535                                   bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity,  
    536                                           isMovingObject, normals, oldIdx); 
     536                                   bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity,  
     537                                           isMovingObject, normals, oldIdx); 
    537538                } 
    538539        } 
Note: See TracChangeset for help on using the changeset viewer.