Ignore:
Timestamp:
10/06/08 16:00:35 (16 years ago)
Author:
mattausch
Message:

improved performance by > 20 frames

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

Legend:

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

    r3007 r3008  
    617617        glDisable(GL_LIGHTING); 
    618618        glDisable(GL_BLEND); 
     619        glDisable(GL_DEPTH_TEST); 
    619620 
    620621        glPushAttrib(GL_VIEWPORT_BIT); 
     
    631632        glPushMatrix(); 
    632633        glLoadIdentity(); 
    633  
    634         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    635634 
    636635        if (shadowMap) 
     
    724723        glDrawBuffers(1, mrt + mFboIndex); 
    725724 
    726         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    727  
    728725         
    729726        cgGLBindProgram(sCgSsaoProgram); 
     
    837834        GLuint normalsTex = fbo->GetColorBuffer(2)->GetTexture(); 
    838835 
    839         //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    840836        cgGLBindProgram(sCgAntiAliasingProgram); 
    841837         
     
    880876        glDrawBuffers(1, mrt + colorBufferIdx); 
    881877         
    882         //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    883          
    884878        cgGLBindProgram(sCgDeferredProgram); 
    885879 
     
    943937        GLuint oldIllumTex = mFbo->GetColorBuffer(2 - mFboIndex + 1)->GetTexture(); 
    944938         
    945         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    946  
    947939        cgGLBindProgram(sCgGiProgram); 
    948940 
     
    10431035        cgGLBindProgram(sCgCombinedIllumProgram); 
    10441036 
    1045         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    1046          
    10471037 
    10481038        cgGLSetTextureParameter(sColorsTexCombinedIllumParam, colorsTex); 
     
    10881078        glDrawBuffers(1, mrt + colorBufferIdx); 
    10891079 
    1090         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    1091          
    10921080        cgGLBindProgram(sCgCombinedSsaoProgram); 
    10931081 
     
    11381126 
    11391127         
    1140         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    1141  
    11421128        cgGLBindProgram(sCgDeferredShadowProgram); 
    11431129 
     
    12431229        glDrawBuffers(1, mrt + colorBufferIdx); 
    12441230         
    1245         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    1246  
    12471231        cgGLBindProgram(sCgLogLumProgram); 
    12481232         
     
    12701254        //-- compute avg loglum in scene using mipmapping 
    12711255 
    1272         //glBindTexture(GL_TEXTURE_2D, fbo->GetColorBuffer(colorBufferIdx)->GetTexture()); 
    1273         //glGenerateMipmapEXT(GL_TEXTURE_2D); 
     1256        glBindTexture(GL_TEXTURE_2D, fbo->GetColorBuffer(colorBufferIdx)->GetTexture()); 
     1257        glGenerateMipmapEXT(GL_TEXTURE_2D); 
    12741258} 
    12751259 
     
    13221306        glDrawBuffers(1, mrt + downSampleBufferIdx); 
    13231307 
    1324         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    13251308        cgGLBindProgram(sCgDownSampleProgram); 
    13261309         
     
    13571340 
    13581341        fbo->Bind(); 
    1359 #if 0 
     1342#if 1 
    13601343        colorBufferIdx = 3 - colorBufferIdx; 
    13611344        glDrawBuffers(1, mrt + colorBufferIdx); 
    1362  
    1363         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    13641345 
    13651346        cgGLBindProgram(sCgToneProgram); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/tonemap.cg

    r3007 r3008  
    8282{ 
    8383        pixel OUT; 
    84         return OUT; 
     84         
    8585        float4 color = tex2D(colors, IN.texCoord); 
    8686 
     
    112112 
    113113        pixel OUT; 
    114 return OUT;/* 
     114         
    115115        const float4 color = tex2Dlod(colors, float4(IN.texCoord.xy, 0, 0)); 
    116116 
     
    134134                OUT.col.w = logLumScaled; 
    135135 
    136         return OUT;*/ 
     136        return OUT; 
    137137} 
Note: See TracChangeset for help on using the changeset viewer.