{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

DX4 - DirectX Programming#4 Kang Seongtae Computer Graphics...

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
DirectX Programming #4 Kang, Seongtae Computer Graphics, 2009 Spring
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Programmable Shader For recent hardwares, vertex and pixel processing stage of the graphics pipeline is programmable Programmable Vertex Shader Programmable Pixel Shader Geometry processing also programmable since D3D10
Image of page 2
Programming for Shader In early stage, hardware-dependant mnemonic language is used to program for shader Shader Assembler Currently, C-like shading language is widely used Cg, HLSL, GLSL General programming platform to utilize GPU’s computing power for general purpose is being introduced lately NVIDIA CUDA OpenCL
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Brief History on Programmable Shader Pixar RenderMan Interface Specification (1988) Concept of Shader Language(SL) is introduced Required special-purpose hardwares and used for studio works Luxo Jr. (SIGGRAPH, 1986)
Image of page 4
Brief History on Programmable Shader NVIDIA Cg (1998) Introduced to program NVIDIA’s programmable GPU C-like grammar with reserved keywords // input vertex struct VertIn { float4 pos : POSITION; float4 color : COLOR0; }; // output vertex struct VertOut { float4 pos : POSITION; float4 color : COLOR0; }; // vertex shader main entry VertOut main(VertIn IN, uniform float4x4 modelViewProj) { VertOut OUT; OUT.pos = mul(modelViewProj, IN.pos); // calculate output coords OUT.color = IN.color; // copy input color to output OUT.color.z = 1.0f; // blue component of color = 1.0f return OUT; }
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Brief History on Programmable Shader Programmable shader for consumer hardware Microsoft DirectX 8 and Shader Model 1.1 (2000) NVIDIA GeForce 3 series (2001) Shader assembler is introduced for vertex and pixel shader programmability
Image of page 6
Brief History on Programmable Shader Microsoft High-Level Shading Language (HLSL) Microsoft DirectX 9 and Shader Model 2 (2002) Developed alongside NVIDIA Cg Very similar to Cg struct VS_OUTPUT0 { float4 Pos : POSITION; // position float4 ObjSliceTex : TEXCOORD0;
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern