• Question about postprocessing

    From newbie_x11@21:1/5 to All on Wed Sep 28 16:25:05 2016
    I have the code below that uses a shader any.

    context.BeginFrame();
    Renderer.PreRender();
    if (frag_color_xy_shader != NULL)
    {
    frag_color_xy_shader->Use();
    frag_color_xy_shader->setFloat("u_time", context.secs);
    frag_color_xy_shader->setVec2("u_resolution", glm::vec2(static_cast<GLfloat>(SCREEN_WIDTH), static_cast<GLfloat>(SCREEN_HEIGHT)));
    frag_color_xy_shader->setVec2("u_mouse", glm::vec2(static_cast<GLfloat>(mouse_x), static_cast<GLfloat>(mouse_y)));
    }

    glEnable(GL_TEXTURE_2D);
    glActiveTexture(GL_TEXTURE0);
    glBindTexture(GL_TEXTURE_2D, glTex2D);
    glBegin(GL_QUADS);
    glTexCoord2f(1.0, 1.0); glVertex3f(0, 0, 1);
    glTexCoord2f(1.0, 0.0); glVertex3f(0, SCREEN_HEIGHT, 1);
    glTexCoord2f(0.0, 0.0); glVertex3f(SCREEN_WIDTH, SCREEN_HEIGHT, 1);
    glTexCoord2f(0.0, 1.0); glVertex3f(SCREEN_WIDTH, 0, 1);
    glEnd();

    Renderer.PostRender();

    My question is: how do I add more shaders, for example a shader that renders the final image by applying a FXAA.

    thanks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)