Lecture 9 Programmable Shaders.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Lecture 9 Programmable Shaders.ppt

Lecture 9: Programmable Shaders Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology Why Programmable Shaders Hardwired pipeline Produces limited effects Effects look the same Gamers want unique look-n-feel Multi-texturing somewhat alleviates this, but not enough Less interoperable, less portable Programmable Shaders Vertex Shader Pixel or Fragment Shader Starting from DX 8.0 assembly DX 9.0 added HLSL High Level Shading Language HLSL MS is compatible with Cg Nvidia Evolution of Graphics Processing Units Pre-GPU Video controller Dumb frame buffer First generation GPU PCI bus Raterization done on GPU ATI Rage, Nvidia TNT2, 3dfx Voodoo3 ‘96 Second generation GPU AGP Include TL into GPU Nvidia GeForce 256, ATI Radeon 7500, S3 Savage3D ’98 Third generation GPU Programmable vertex shader Nvidia GeForce3, ATI Radeon 8500, Microsoft Xbox ’01 Fourth generation GPU Both programmability in vertex and fragment shaders Nvidia GeForce FX, ATI Radeon 9700 ’02 Programmable Graphics Pipeline Graphics Programmable Pipeline Shader Languages HLSL most common post-DX 10.0. No assembly shaders allowed in DX 10.0. Other options: Cg compatible with HLSL GLSL Legacy DirectX shaders in assembly Sh OpenVidia U of Toronto Basic Shader Mechanics Data types: Typically floats, and vectors/matrices of floats Fixed size arrays Three types: Per-instance data, e.g. per-vertex position Per-pixel interpolated data, e.g. texture coordinates Per-batch data, e.g. light position Data are tightly bound to the GPU Flow control is very simple: No recursion Fixed size loops for v_2_0 or earlier Simple if-then-else statements allowed in the latest APIs Texkill asm or clip HLSL or discard GLSL or allows you to abort a write to a pixel form of flow control Vertex Shader Transform to clip-space i.e. screen space Inputs: Common inputs: Vertex position x, y, z, w Texture coordinate Constant inputs Can also have fog, color as i

文档评论(0)

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

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

1亿VIP精品文档

相关文档