《OpenGL计算机三维图形程序设计》三维程序设计-opengl.ppt

《OpenGL计算机三维图形程序设计》三维程序设计-opengl.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
FBO的使用 当所有上述的准备工作都完成之后,就可以调用glBindFramebufferEXT()来绑定一个FBO。随后,就可一像操作窗体系统提供的帧缓冲区一样操作当前绑定的FBO了。日常的3D渲染操作这里不再赘述。这里主要强调像素操作的使用。OpenGL提供了 glBlitFramebufferEXT()函数进行像素操作。 Chapter 6 Blending, Antialiasing, Fog, and Polygon Offset Blending Blending occurs after your scene has been rasterized and converted to fragments, but just before the final pixels are drawn in the framebuffer. Alpha values can also be used in the alpha test to accept or reject a fragment based on its alpha value. Color blending lies at the heart of techniques such as transparency, digital compositing, and painting. Transparent or translucent surfaces have lower opacity than opaque ones and, therefore, lower alpha values. The Source and Destination Factors During blending, color values of the incoming fragment (the source) are combined with the color values of the corresponding currently stored pixel (the destination) in a two-stage process. (RsSr+RdDr, GsSg+GdDg, BsSb+BdDb, AsSa+AdDa) Each component of this quadruplet is eventually clamped to [0,1]. void glBlendFunc(GLenum sfactor, GLenum dfactor); Controls how color values in the fragment being processed (the source) are combined with those already stored in the framebuffer (the destination). The argument sfactor indicates how to compute a source blending factor; dfactor indicates how to compute a destination blending factor. after the color values in the source and destination are combined, theyre clamped to the range [0,1]. Source and Destination Blending Factors Sample Uses of Blending One way to draw a picture composed half of one image and half of another, equally blended, To blend three different images equally Suppose youre writing a paint program, and you want to have a brush that gradually adds color so that each brush stroke blends in a little more color with whatever is currently in the image (say 10percent color with 90 percent image on each pass). Sample Uses of Blending The blending functions that use the source or destination colors

文档评论(0)

***** + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档