Changeset 3347 for GTP


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

1 rendertarget not working perfectly

Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp

    r3345 r3347  
    432432        mDownSampleFbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 
    433433 
     434 
    434435        for (int i = 0; i < 2; ++ i) 
    435436        { 
     
    928929 
    929930        // the neighbouring texels 
    930         float xOffs = 1.0f / fbo->GetWidth(); 
    931         float yOffs = 1.0f / fbo->GetHeight(); 
     931        const float xOffs = 1.0f / fbo->GetWidth(); 
     932        const float yOffs = 1.0f / fbo->GetHeight(); 
    932933 
    933934        sCgAntiAliasingProgram->SetTexture(0, colorsTex); 
     
    13821383        gluOrtho2D(0, 1, 0, 1); 
    13831384 
    1384  
    13851385        glMatrixMode(GL_MODELVIEW); 
    13861386        glPushMatrix(); 
    13871387        glLoadIdentity(); 
    1388  
    13891388         
    13901389        glPushAttrib(GL_VIEWPORT_BIT); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h

    r3346 r3347  
    88#define NUM_PRECOMPUTED_SAMPLES 4096 
    99 
    10 #define NUM_SAMPLES 8 
     10//#define NUM_SAMPLES 8 
    1111//#define NUM_SAMPLES 16 
    1212//#define NUM_SAMPLES 24 
    13 //#define NUM_SAMPLES 48 
     13#define NUM_SAMPLES 32 
    1414 
    1515//#define MIN_SAMPLES 48 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsaoSep.cg

    r3343 r3347  
    250250 
    251251        //OUT.illum_col.xyz = float3(ao.w * 5e-1f, 0, 0); 
    252         //OUT.illum_col.xyz = float3(ao.z * 1e-1f); 
     252        //OUT.illum_col.xyz = float3(ao.y * 1e-2f); 
    253253        //OUT.illum_col.xyz = float3(ao.y * 1e-1f);//, 0, 0); 
    254254        //OUT.illum_col.xyz = ao.xyz; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r3345 r3347  
    255255        const float4 oldPixel = tex2Dlod(oldTex, float4(oldTexCoords, .0f, .0f)); 
    256256        //const float oldDiff = tex2Dlod(myTex, float4(oldTexCoords, .0f, .0f)).x; 
    257         const float oldDiff = tex2Dlod(myTex, float4(oldTexCoords, .0f, .0f)).z; 
     257        const float oldDiff = oldPixel.z;//tex2Dlod(myTex, float4(oldTexCoords, .0f, .0f)).z; 
    258258 
    259259        // calculate eye space position of sample in old frame 
     
    306306                isPixelValid = pixelIsValid; 
    307307        } 
     308        //isPixelValid = pixelIsValid; 
    308309         
    309310        return float2(isPixelValid, abs(oldEyeSpaceDepth - projectedEyeSpaceDepth)); 
  • 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.