Ignore:
Timestamp:
02/25/09 15:51:45 (15 years ago)
Author:
mattausch
Message:

probably found error with texture

File:
1 edited

Legend:

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

    r3326 r3327  
    179179                         sampler2D colors, 
    180180                         sampler2D noiseTex, 
     181                         //float2 samples[NUM_PRECOMPUTED_SAMPLES], 
    181182                         sampler2D samples, 
    182183                         float3 normal, 
     
    204205 
    205206                const float2 ssaoOffset = tex2Dlod(samples, float4((0.5f + i + idx) / NUM_PRECOMPUTED_SAMPLES, 0.5f, .0f, .0f)).xy; 
    206  
     207                //const float2 ssaoOffset = samples[i]; 
    207208 
    208209                //////////////////// 
     
    455456                        uniform sampler2D noiseTex, 
    456457                        uniform sampler2D samples, 
     458                        //uniform float2 samples[NUM_PRECOMPUTED_SAMPLES], 
    457459                        uniform sampler2D oldTex, 
    458460                        uniform float4x4 modelViewProj, 
     
    511513 
    512514        const float oldSsao = temporalVals.x; 
    513         float oldWeight = temporalVals.y; 
    514         float oldIdx = temporalVals.z; 
     515        const float oldWeight = temporalVals.y; 
     516        const float oldIdx = 0;//temporalVals.z; 
    515517 
    516518        float3 ao; 
     
    520522        { 
    521523                if (0) 
     524                { 
    522525                        ao = ssao(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, isMovingObject); 
     526                } 
    523527                else 
     528                { 
    524529                        ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor,  
    525530                                   bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity,  
    526531                                           isMovingObject, normals, oldIdx); 
     532                } 
    527533        } 
    528534        else 
     
    574580        OUT.illum_col.w = eyeSpaceDepth; 
    575581 
     582        //if (OUT.illum_col.z > 1000) OUT.illum_col.z = 0; 
     583 
    576584        // this value can be used to check if this pixel belongs to a moving object 
    577585        OUT.col.x = SqrLen(diffVec); 
    578586        //OUT.illum_col.z = SqrLen(diffVec); 
    579587 
    580         OUT.illum_col.xyz = normal.xyz; 
     588        //OUT.illum_col.xyz = normal.xyz; 
    581589        return OUT; 
    582590} 
Note: See TracChangeset for help on using the changeset viewer.