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

逛奔的蝸牛

我不聰明,但我會很努力

   ::  :: 新隨筆 ::  ::  :: 管理 ::
Accumulation Buffer(非時實(shí)繪制情況下, 做全局反鋸齒的效果最好, 運(yùn)動模糊):
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. 
也是很簡單的幾步, 但是要把同一個物體多畫幾次, 累積出motion blur效果, 會占用很多內(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) 評論(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>
            亚洲美女黄网| 欧美一区二区精品久久911| 亚洲精品一二| 夜夜精品视频一区二区| 欧美乱在线观看| 这里只有精品在线播放| 亚洲欧美亚洲| 激情久久久久久久| 欧美女同视频| 香港成人在线视频| 蜜臀a∨国产成人精品| 亚洲美女精品一区| 国产区精品在线观看| 欧美亚洲尤物久久| 亚洲人成亚洲人成在线观看图片 | 免费不卡在线视频| 中文一区在线| 亚洲国产精品欧美一二99| 亚洲一区激情| 亚洲精品一级| 怡红院精品视频| 国产精品乱码人人做人人爱| 久久久久久九九九九| 亚洲毛片视频| 欧美激情一区二区久久久| 久久动漫亚洲| 亚洲系列中文字幕| 亚洲精品一区在线| 在线观看成人网| 国产精品理论片| 欧美日韩国产成人在线观看| 久久青青草综合| 欧美一区二区三区视频免费| 在线视频欧美日韩精品| 亚洲精品久久视频| 亚洲国产婷婷香蕉久久久久久99 | 亚洲国产美女| 免费成人av在线看| 久久久久久免费| 亚洲午夜激情| 亚洲国产综合在线看不卡| 免费国产自线拍一欧美视频| 日韩亚洲不卡在线| 欧美国产日韩一区二区| 久久精品国产亚洲5555| 亚洲一区成人| 亚洲精品之草原avav久久| 国产美女精品视频免费观看| 欧美欧美天天天天操| 久久婷婷综合激情| 久久免费国产精品| 久久嫩草精品久久久久| 亚洲视频第一页| 日韩午夜一区| 亚洲日本一区二区三区| 亚洲国产高清一区| 亚洲大片在线| 久久夜色精品一区| 久久蜜臀精品av| 欧美大片网址| 欧美1级日本1级| 嫩草国产精品入口| 欧美bbbxxxxx| 亚洲高清一二三区| 欧美v国产在线一区二区三区| 国产欧美一区二区色老头| 日韩一级黄色大片| 欧美激情一区二区三区高清视频 | 亚洲黄色成人久久久| 亚洲电影有码| 一本色道久久综合精品竹菊 | 国产精品毛片| 国产精品日韩欧美一区| 国产伦理一区| 欧美激情在线| 欧美电影免费网站| 欧美日本簧片| 国产精品劲爆视频| 欧美天天影院| 国产精品青草综合久久久久99| 国产精品jizz在线观看美国 | 一本到12不卡视频在线dvd| 亚洲欧洲日韩综合二区| 国产一区二区高清| 亚洲成色www久久网站| 亚洲电影免费在线| 夜夜嗨av一区二区三区中文字幕 | 亚洲精品欧洲| 99热免费精品| 中国亚洲黄色| 亚洲一区二区三区涩| 一本一道久久综合狠狠老精东影业| 国模私拍视频一区| 亚洲精品九九| 亚洲日本免费电影| 亚洲视频电影在线| 欧美一区二区在线视频| 亚洲第一久久影院| 一区二区欧美激情| 久久综合中文字幕| 欧美日韩在线看| 亚洲二区在线| 亚洲影院色在线观看免费| 欧美99久久| 午夜精品美女自拍福到在线 | 久久黄金**| 欧美激情综合网| 欧美激情一区在线观看| 国产精品久久久久一区| 亚洲啪啪91| 欧美综合77777色婷婷| 狼人社综合社区| 亚洲人成网站777色婷婷| 亚洲欧美日韩精品综合在线观看| 久久国产手机看片| 欧美金8天国| 在线欧美视频| 久久超碰97中文字幕| 亚洲激情另类| 久久精品国产精品亚洲| 亚洲高清视频在线| 久久久精品网| 国产精品国产自产拍高清av| 亚洲精品女av网站| 亚洲电影成人| 麻豆av福利av久久av| 伊人久久大香线蕉综合热线| 亚洲欧美日韩在线一区| 亚洲高清免费视频| 免费在线亚洲欧美| 黑人操亚洲美女惩罚| 欧美日本韩国一区| 亚洲伦伦在线| 亚洲精品欧洲| 欧美日韩人人澡狠狠躁视频| 亚洲美女视频在线观看| 亚洲欧洲精品一区| 欧美精品在线免费观看| 亚洲国产精品第一区二区| 麻豆国产va免费精品高清在线| 亚洲欧美日韩精品综合在线观看| 国产精品麻豆成人av电影艾秋| 中文欧美在线视频| 亚洲韩国日本中文字幕| 免费精品99久久国产综合精品| 国产精品久久亚洲7777| 亚洲一区二区三区四区在线观看| 亚洲二区视频| 亚洲一级在线观看| 欧美一区免费视频| 欧美日本国产一区| 亚洲综合欧美| 欧美一区影院| 极品少妇一区二区三区| 女人色偷偷aa久久天堂| 欧美国产精品日韩| 亚洲婷婷综合久久一本伊一区| 亚洲一区视频| 国产精品视频不卡| 免费看成人av| 六月婷婷久久| 日韩视频免费观看高清在线视频 | 99国产精品久久久| 久久久高清一区二区三区| 在线观看91精品国产入口| 麻豆亚洲精品| 欧美.com| 亚洲欧美成人| 久久综合亚洲社区| 亚洲精品一区二区三区樱花| 99综合精品| 国产欧美日韩另类一区| 久久国产精品网站| 久久免费偷拍视频| 亚洲欧美日本在线| 久久手机免费观看| 欧美影院久久久| 夜夜躁日日躁狠狠久久88av| 亚洲一区二区在线视频 | 亚洲欧美日韩综合| 亚洲人体1000| 久久国产精品久久久久久电车| 在线观看久久av| 亚洲欧美日韩国产精品| 日韩系列欧美系列| 亚洲欧美美女| 亚洲精品国产精品国自产在线| 亚洲精品日韩一| 激情成人中文字幕| 亚洲午夜在线视频| 最新中文字幕亚洲| 亚洲日本aⅴ片在线观看香蕉| 欧美日韩成人在线观看| 亚洲摸下面视频| 欧美另类变人与禽xxxxx| 激情久久婷婷| 在线一区二区三区四区五区| 日韩一区二区高清| 久久精品一区四区| 亚洲欧美在线免费观看|