- 1、本文档共70页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Modern Game Techniques Computer Graphics at Stanford 现代计机图形技术在斯坦福的游戏
Announcments Sign up for crits! Reading for Next Week FvD 16.1-16.3 – local lighting models GL 5 – lighting GL 9 (skim) – texture mapping Modern Game Techniques CS248 Lecture Nov 13 Andrew Adams Overview The OpenGL Pipeline Vertex and Fragment Shaders Multipass Techniques Culling and Collision Detection The OpenGL Pipeline The OpenGL Pipeline The OpenGL Pipeline The OpenGL Pipeline The OpenGL Pipeline The OpenGL Pipeline The OpenGL Pipeline The OpenGL Pipeline The OpenGL Pipeline with Shaders The OpenGL Pipeline with Shaders The OpenGL Pipeline with Shaders The OpenGL Pipeline with Shaders The OpenGL Pipeline with Shaders The OpenGL Pipeline with Shaders GLSL Types Float types: float, vec2, vec3, vec4, mat2, mat3, mat4 Bool types: bool, bvec2, bvec3, bvec4 Int types: int, ivec2, ivec3, ivec4 Texture types: sampler1D, sampler2D, sampler3D GLSL Types A variable can optionally be: Const Uniform Can be set from c, outside glBegin/glEnd Attribute Can be set from c, per vertex Varying Set in the vertex shader, interpolated and used in the fragment shader Creating your own shaders Get at the extension functions use glew / Load the shaders as strings Compile them Link them into a ‘program’ Enable the program Draw something (Live Demo) References A great tutorial and reference: /opengl/glsl/ The spec for GLSL, includes all the available builtin functions and state: /documentation/glsl/ The OpenGL ‘orange book’ on shaders is also good Multipass Techniques Many cool effects are easier to achieve by rendering the scene multiple times: Render the scene Read the scene into a texture Render that texture on the screen in some interesting way Motion Blur 1) T = empty texture 2) Render a slightly dimmed T 3) Render the scene 4) Copy the framebuffer into T 5) Goto 2 (Live Demo) Motion Blur: Two Questions Question 1: What’s incorrect about this motion blur? (from a sampling point of view) Question 2: How could this be modified to make a zoom blur? Sharpen Filter Render the
您可能关注的文档
- LCI Uncertainty Internet Engineering Task ForceCI的不确定性——互联网工程任务组.ppt
- LBC – EVIDENCE FOR MPROVED SENSITIVITY IN THE 为提高灵敏度的LBC–证据.ppt
- LatticeBased Statistical Spoken DocumentRetrieval基于统计的语音文件检索格.ppt
- LCD板关键零组件价格预测及分析.doc
- Lattice Moels of Protein Folding North Carolina State University北卡罗来纳州立大学的格子模型的蛋白质折叠.ppt
- LCMSMS测定伊康唑脂质体小鼠血浆中浓度.doc
- LDA on Glass Temple UniversityLDA在玻璃天普大学.doc
- LC项下单结汇.doc
- Le chaos en quelques motsdoc Université de Tolon混沌在几motsdoc # 233土伦大学;.doc
- LDC Representation i NonLegislative Drafting of International 在国际非立法起草LDC表示.ppt
文档评论(0)