Ignore:
Timestamp:
04/13/09 21:44:00 (15 years ago)
Author:
mattausch
Message:

1 rendertarget not working perfectly

File:
1 edited

Legend:

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

    r3346 r3347  
    154154        else 
    155155        {        
    156                 w = .0f; 
     156                w   = .0f; 
    157157                idx = .0f; 
    158158        } 
    159159 
    160         return float3(ssao, w, idx); 
     160        return float3(ssao, idx, w); 
    161161} 
    162162 
     
    201201                        tex2Dlod(samples, float4((0.5f + i + idx) / NUM_PRECOMPUTED_SAMPLES, 0.5f, .0f, .0f)).xy; 
    202202 
     203 
    203204                //////////////////// 
    204205                //-- add random noise: reflect around random normal vector  
     
    207208                if (convergence < SSAO_CONVERGENCE_THRESHOLD) 
    208209                { 
    209                         float2 mynoise = tex2Dlod(noiseTex, float4(IN.texCoord * 4.0f, 0, 0)).xy; 
     210                        float2 mynoise = tex2Dlod(noiseTex, float4(IN.texCoord * 4.0f, .0f, .0f)).xy; 
    210211                        //offset = myreflect(samples[i], mynoise); 
    211212                        //offset = myrotate(samples[i], mynoise.x); 
     
    584585                else if (ao.y > partlyResetThres) 
    585586                { 
     587                        if (oldIdx > 4.0f * NUM_SAMPLES) oldIdx = 0; 
    586588                        //oldWeight = min(oldWeight, 4.0f * NUM_SAMPLES); oldIdx = oldWeight; 
    587                         //oldWeight = .0f; oldIdx = .0f; 
     589                        oldWeight = oldIdx;//.0f; oldIdx = .0f; 
    588590                } 
    589591        } 
Note: See TracChangeset for help on using the changeset viewer.