Git Product home page Git Product logo

fbo-in-opengl's Introduction

离屏渲染

  • 使用OpenGL的帧缓冲(Frame Buffer)将场景渲染到不同的帧缓冲,可以做图像的后期处理;
  • 使用多样本帧缓冲还可以实现抗锯齿(Anti-aliasing)效果,称为离屏MSAA,甚至可以自定义抗锯齿算法;

依赖

  • glfw3.lib 推荐在官方网站下载源代码,然后自行编译。本项目编译使用的是CMake和Visual Studio 2015.
  • GLAD 打开GLAD的在线服务可轻松配置。本项目使用OpenGL 4.3.
  • stb_image.h 是Sean Barrett的一个非常流行的单头文件图像加载库,可以在这里下载。本项目使用其来加载纹理图片。
  • GLM 一个只有头文件的库,不用链接和编译。可以在它们的网站上下载。本项目使用其作为数学库。
  • Assimp 一个非常流行的模型导入库,可以在下载页面选择相应的版本,自行使用CMake 和 Visual Studio 2015编译。

后期处理

  • 原始画面: Origin
  • 反相(Inversion): Inversion
  • 灰度化(Grayscale): Grayscale
  • 抗锯齿(Anti-aliasing):
  • 抗锯齿比较特殊,使用多采样抗锯齿(Multisample Anti-aliasing),意味着要使用多采样帧缓冲。一个多采样图像包含了比普通图像更多的信息,所以最后需要压缩或还原图像。如果想要使用AA后的图像做后期处理,还需要生成一个新的FBO作为中介。 Anti-aliasing
  • 核效果(Kernel):

锐化(Sharpen):

Sharpen

模糊(Blur):

Blur

边缘检测(Edge-detection):

Edge-detection

fbo-in-opengl's People

Contributors

sweeneychoi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.