青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

逛奔的蝸牛

我不聰明,但我會(huì)很努力

   ::  :: 新隨筆 ::  ::  :: 管理 ::
Accumulation Buffer(非時(shí)實(shí)繪制情況下, 做全局反鋸齒的效果最好, 運(yùn)動(dòng)模糊):
Color Buffer, Depth Buffer, Stencil Buffer, Accumulation Buffer, (Double Buffer, ^_^)

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_ACCUM); 

The accumulation buffer is an extended-range color buffer. Images are not rendered into it. Rather, images rendered into one of the color buffers are added to the contents of the accumulation buffer after rendering. Effects such as antialiasing (of points, lines, and polygons), motion blur, and depth of field can be created by accumulating images generated with different transformation matrices.

This buffer allows you to render to the color buffer, and then instead of displaying the results in the window, copy the contents of the color buffer to the accumulation buffer. Several supported copy operations allow you to repeatedly blend, in different ways, the color buffer contents with the accumulated contents in the accumulation buffer (thus its name). When you have finished accumulating an image, you can then copy the accumulation buffer back to the color buffer and display the results with a buffer swap. 
也是很簡(jiǎn)單的幾步, 但是要把同一個(gè)物體多畫(huà)幾次, 累積出motion blur效果, 會(huì)占用很多內(nèi)存與資源.

Because of the large amount of memory that must be copied and processed for accumulation buffer operations, few real-time applications make use of this capability. For non-real-time rendering, OpenGL can produce some astonishing effects that you might not expect from a real-time API. For example, you can render a scene multiple times and move the point of view around by a fraction of a pixel each time. Accumulating these multiple rendering passes blurs the sharp edges and can produce an entire scene fully antialiased with a quality that surpasses anything that can be done with multisampling. You can also use this blurring effect to blur the background or foreground of an image and then render the object of focus clearly afterward, simulating some depth-of-field camera effects.

操作: 
In our sample program MOTIONBLUR, we will demonstrate yet another use of the accumulation buffer to create what appears to be a motion blur effect. A moving sphere is drawn repeatedly in different positions. Each time it is drawn, it is accumulated to the accumulation buffer, with a smaller weight on subsequent passes. The result is a brighter red sphere with a ghostlike image of itself following along behind.
Shows the DrawGeometry function, which draws all the geometry of the scene. 
The RenderScene function then repeatedly calls this function and accumulates the results into the accumulation buffer. When that process is finished, the lines 
glAccum(GL_RETURN, 1.0f); 
glutSwapBuffers(); 
copy the accumulation buffer back to the color buffer and perform the buffer swap. 
Using the Accumulation Buffer for Motion Blur: 

///////////////////////////////////////////////////////////// 
// Draw the ground and the revolving sphere 
void DrawGeometry(void) {
    // Clear the window with current clearing color 
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glPushMatrix();
        DrawGround();
        // Place the moving sphere 
        glColor3f(1.0f, 0.0f, 0.0f);
        glTranslatef(0.0f, 0.5f, -3.5f);
        glRotatef(-(yRot * 2.0f), 0.0f, 1.0f, 0.0f);
        glTranslatef(1.0f, 0.0f, 0.0f);
        glutSolidSphere(0.1f, 17, 9);
    glPopMatrix();
}

/////////////////////////////////////////////////////////////////////// 
// Called to draw scene. The world is drawn multiple times with each 
// frame blended with the last. The current rotation is advanced each 
// time to create the illusion of motion blur. 
void RenderScene(void) {
    GLfloat fPass;
    GLfloat fPasses = 10.0f;
    // Set the current rotation back a few degrees 
    yRot = 35.0f;
    for (fPass = 0.0f; fPass < fPasses; fPass += 1.0f) {
        yRot += .75f; //1.0f / (fPass+1.0f); 
        // Draw sphere 
        DrawGeometry();
        // Accumulate to back buffer 
        if (fPass == 0.0f)
            glAccum(GL_LOAD, 0.5f);
        else
            glAccum(GL_ACCUM, 0.5f * (1.0f / fPasses));
    }

    

    // copy accumulation buffer to color buffer and 
    // do the buffer Swap 
    glAccum(GL_RETURN, 1.0f);
    glutSwapBuffers();



void glAccum(GLenumm op, GLfloat value);

Operation Description 
GL_ACCUM  Scales the color buffer values by value and adds them to the current  contents of the accumulation buffer. 

GL_LOAD  Scales the color buffer values by value and replaces the current contents  of the accumulation buffer. 

GL_RETURN  Scales the color values from the accumulation buffer by value and then 
copies the values to the color buffer. 

GL_MULT  Scales the color values in the accumulation buffer by value and stores the 
result in the accumulation buffer. 

GL_ADD  Scales the color values in the accumulation buffer by value and adds the 
result to the current accumulation buffer contents. 

How to scale: ***

posted on 2009-05-24 03:35 逛奔的蝸牛 閱讀(1832) 評(píng)論(0)  編輯 收藏 引用 所屬分類: OpenGL
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美在线free| 久久亚洲私人国产精品va媚药| 国产精品久久久免费| 欧美激情第六页| 国产精品扒开腿做爽爽爽软件| 国产精品每日更新| 国内免费精品永久在线视频| 亚洲国产另类精品专区| 一本久久综合亚洲鲁鲁| 亚洲欧美日韩一区二区三区在线观看 | 精品不卡一区| 国产精品video| 国产亚洲欧美色| 亚洲精品一区中文| 欧美一区二区三区免费在线看| 久久综合狠狠综合久久综青草 | 午夜精品福利在线观看| 久久亚洲精选| 欧美日韩三级电影在线| 国产一区二区三区四区五区美女| 最新国产精品拍自在线播放| 午夜激情一区| 亚洲国产另类 国产精品国产免费| 99精品免费网| 久久亚洲综合网| 国产精品女主播| 亚洲精品激情| 久久久精品国产一区二区三区| 91久久国产自产拍夜夜嗨| 欧美专区第一页| 国产精品视频999| 亚洲精选视频免费看| 久久青草欧美一区二区三区| 正在播放亚洲一区| 欧美日本一区二区三区| 亚洲人体一区| 亚洲成人在线网站| 久久天天躁夜夜躁狠狠躁2022 | 亚洲欧美日韩成人| 欧美日韩成人在线视频| 在线免费观看日本一区| 欧美在线视频a| 一区电影在线观看| 欧美a级片网| 在线成人亚洲| 久久女同互慰一区二区三区| 午夜国产欧美理论在线播放| 欧美色区777第一页| 亚洲精品一区中文| 欧美成人免费观看| 久久免费午夜影院| 在线看无码的免费网站| 蜜桃av久久久亚洲精品| 久久精品免费看| 在线观看日韩av电影| 美女网站在线免费欧美精品| 久久精品色图| 亚洲第一精品影视| 你懂的视频欧美| 另类人畜视频在线| 亚洲人人精品| 亚洲美女在线观看| 国产精品福利在线| 欧美日韩日本视频| 欧美三区美女| 亚洲欧美在线aaa| 午夜久久tv| 在线观看欧美激情| 欧美激情久久久久久| 欧美www在线| 在线视频日韩精品| 亚洲欧美国产高清va在线播| 国产免费观看久久| 久久久免费精品视频| 久久久久久香蕉网| 亚洲精品欧洲| 在线亚洲美日韩| 黄色成人av网站| 亚洲福利视频网站| 国产精品乱子久久久久| 可以免费看不卡的av网站| 欧美高清视频www夜色资源网| 亚洲美女色禁图| 一区二区三区导航| 悠悠资源网亚洲青| 亚洲精品久久久久久久久久久久久| 国产精品成人免费| 麻豆乱码国产一区二区三区| 欧美精品一区视频| 久久久久99| 欧美日韩国产成人精品| 久久久精品国产99久久精品芒果| 免费试看一区| 欧美专区18| 欧美国产日产韩国视频| 欧美一区二区三区视频| 欧美粗暴jizz性欧美20| 午夜精品一区二区三区四区 | 黄色成人在线观看| 91久久精品网| 黄色成人在线网站| 亚洲一区二区三区国产| 亚洲韩国青草视频| 欧美在线欧美在线| 亚洲一区区二区| 欧美va亚洲va国产综合| 久久国产主播精品| 国产精品视频内| 亚洲狼人综合| 亚洲欧洲精品一区二区三区波多野1战4 | 欧美在线网站| 亚洲一区影院| 欧美国产高潮xxxx1819| 久久久亚洲成人| 国产精品国产a级| 亚洲精品美女91| 亚洲激情成人在线| 久久久久五月天| 久久狠狠一本精品综合网| 欧美色网在线| 亚洲伦理在线免费看| 国产午夜精品视频免费不卡69堂| 久久午夜电影| 欧美一区二区三区视频在线| 欧美日韩美女| 亚洲欧洲日本国产| 亚洲精选大片| 美女视频黄a大片欧美| 免费在线一区二区| 韩国视频理论视频久久| 香蕉久久夜色精品国产| 亚欧美中日韩视频| 国产精品一区二区三区四区五区| 一区二区欧美日韩| 亚洲制服丝袜在线| 国产精品夜夜夜一区二区三区尤| 一本色道久久综合亚洲精品婷婷| 日韩午夜中文字幕| 欧美日韩激情小视频| 亚洲另类自拍| 午夜精品免费视频| 国产视频综合在线| 欧美一级电影久久| 久久一综合视频| 亚洲国产免费看| 欧美www视频| 99综合电影在线视频| 亚洲一级一区| 国产美女诱惑一区二区| 欧美一区二区三区免费视| 久久久久国产精品一区三寸| 黄色一区三区| 欧美成年人视频网站| 日韩午夜在线| 欧美在线免费观看亚洲| 狠狠爱www人成狠狠爱综合网| 久久亚洲综合色一区二区三区| 亚洲第一精品影视| 亚洲一区二区免费在线| 国产一区二区丝袜高跟鞋图片| 久久一综合视频| 亚洲美女一区| 麻豆精品精品国产自在97香蕉| 亚洲人成网在线播放| 国产精品一区一区三区| 老司机午夜精品| 亚洲午夜激情免费视频| 久久久免费精品视频| 日韩亚洲欧美在线观看| 国产农村妇女毛片精品久久莱园子| 久久久久**毛片大全| 日韩手机在线导航| 免费在线看成人av| 亚洲欧美美女| 亚洲人成人一区二区三区| 国产精品视频99| 欧美国产日韩在线| 久久激情网站| 亚洲性感美女99在线| 亚洲国产欧美一区二区三区同亚洲 | 国产在线精品一区二区夜色| 欧美a级大片| 午夜精品短视频| 亚洲毛片视频| 欧美96在线丨欧| 久久狠狠婷婷| 欧美激情一区二区三级高清视频 | 一区二区免费在线视频| 国产亚洲欧美日韩精品| 欧美日韩一区二| 免费美女久久99| 久久久不卡网国产精品一区| 亚洲性线免费观看视频成熟| 亚洲欧洲精品一区二区三区波多野1战4 | 国模一区二区三区| 国产精品香蕉在线观看| 欧美视频精品在线| 欧美极品aⅴ影院| 欧美暴力喷水在线| 麻豆精品视频在线|