Chapter Answers. Appendix A. Chapter 1. This appendix provides answers to all of the book s chapter review questions.

Similar documents
The Application Stage. The Game Loop, Resource Management and Renderer Design

DirectX 11 First Elements

Advanced 3D Game Programming with DirectX* 10.0

Beginning Direct3D Game Programming: 1. The History of Direct3D Graphics

CS 354R: Computer Game Technology

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

Game Architecture. 2/19/16: Rasterization

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Spring 2009 Prof. Hyesoon Kim

Spring 2011 Prof. Hyesoon Kim

Could you make the XNA functions yourself?

CS451Real-time Rendering Pipeline

PROFESSIONAL. WebGL Programming DEVELOPING 3D GRAPHICS FOR THE WEB. Andreas Anyuru WILEY. John Wiley & Sons, Ltd.

Ciril Bohak. - INTRODUCTION TO WEBGL

Rendering Objects. Need to transform all geometry then

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

Rendering Grass with Instancing in DirectX* 10

A Trip Down The (2011) Rasterization Pipeline

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

CS 4620 Program 3: Pipeline

Graphics Programming. Computer Graphics, VT 2016 Lecture 2, Chapter 2. Fredrik Nysjö Centre for Image analysis Uppsala University

CS GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1. Markus Hadwiger, KAUST

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1

CHAPTER 1 Graphics Systems and Models 3

Squeezing Performance out of your Game with ATI Developer Performance Tools and Optimization Techniques

MAXIS-mizing Darkspore*: A Case Study of Graphic Analysis and Optimizations in Maxis Deferred Renderer

Texturing Theory. Overview. All it takes is for the rendered image to look right. -Jim Blinn 11/10/2018

Approximate Catmull-Clark Patches. Scott Schaefer Charles Loop

Textures. Texture coordinates. Introduce one more component to geometry

Module 13C: Using The 3D Graphics APIs OpenGL ES

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

The Rasterization Pipeline

E.Order of Operations

Graphics Hardware, Graphics APIs, and Computation on GPUs. Mark Segal

The Graphics Pipeline

Programmable GPUs. Real Time Graphics 11/13/2013. Nalu 2004 (NVIDIA Corporation) GeForce 6. Virtua Fighter 1995 (SEGA Corporation) NV1

Shader Series Primer: Fundamentals of the Programmable Pipeline in XNA Game Studio Express

Mattan Erez. The University of Texas at Austin

Introduction to the Direct3D 11 Graphics Pipeline

3D Rendering Pipeline

Introduction to Computer Graphics with WebGL

Models and Architectures

Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI

Advanced Lighting Techniques Due: Monday November 2 at 10pm

CS 428: Fall Introduction to. OpenGL primer. Andrew Nealen, Rutgers, /13/2010 1

Shaders (some slides taken from David M. course)

Canonical Shaders for Optimal Performance. Sébastien Dominé Manager of Developer Technology Tools

Siggraph Agenda. Usability & Productivity. FX Composer 2.5. Usability & Productivity 9/12/2008 9:16 AM

Optimal Shaders Using High-Level Languages

Cg 2.0. Mark Kilgard

CS 450: COMPUTER GRAPHICS TEXTURE MAPPING SPRING 2015 DR. MICHAEL J. REALE

Drawing a Crowd. David Gosselin Pedro V. Sander Jason L. Mitchell. 3D Application Research Group ATI Research

The Importance of Matrices in the DirectX API. by adding support in the programming language for frequently used calculations.

Low-Overhead Rendering with Direct3D. Evan Hart Principal Engineer - NVIDIA

The Rasterizer Stage. Texturing, Lighting, Testing and Blending

Programming Graphics Hardware

Rationale for Non-Programmable Additions to OpenGL 2.0

OpenGL ES 2.0 : Start Developing Now. Dan Ginsburg Advanced Micro Devices, Inc.

Chapter 1 Introduction

OpenGL Status - November 2013 G-Truc Creation

Introduction to Shaders.

The Rendering Pipeline (1)

CS 130 Final. Fall 2015

OpenGL: Open Graphics Library. Introduction to OpenGL Part II. How do I render a geometric primitive? What is OpenGL

CSE4030 Introduction to Computer Graphics

CIS 536/636 Introduction to Computer Graphics. Kansas State University. CIS 536/636 Introduction to Computer Graphics

Practical Shadow Mapping

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

1 Preview. Dr. Scott Gordon Computer Science Dept. CSUS. Virtual Cameras, Viewing Transformations: CSc-155 Advanced Computer Graphics

Graphics Processing Unit Architecture (GPU Arch)

The Ultimate Developers Toolkit. Jonathan Zarge Dan Ginsburg

The Graphics Pipeline

NVIDIA Parallel Nsight. Jeff Kiel

AGDC Per-Pixel Shading. Sim Dietrich

NVIDIA Authoring Tools for

Rendering Subdivision Surfaces Efficiently on the GPU

Today s Agenda. Basic design of a graphics system. Introduction to OpenGL

Graphics Hardware. Instructor Stephen J. Guy

Getting fancy with texture mapping (Part 2) CS559 Spring Apr 2017

Project report Augmented reality with ARToolKit

Lecturer Athanasios Nikolaidis

1.2.3 The Graphics Hardware Pipeline

The Graphics Pipeline

Models and Architectures. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Deferred rendering using Compute shaders

Horizon-Based Ambient Occlusion using Compute Shaders. Louis Bavoil

Topics and things to know about them:

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

Computer Graphics with OpenGL ES (J. Han) Chapter XI Normal Mapping

Graphics Processing Unit With Graphics API. Darshana Mistry. Computer Engineering Department, Gandhinagar Institute Of Technology Gandhinagar, India

Deferred Rendering Due: Wednesday November 15 at 10pm

AutoCAD DWG Drawing Limitations in SAP 3D Visual Enterprise 9.0 FP03

OpenGL SUPERBIBLE. Fifth Edition. Comprehensive Tutorial and Reference. Richard S. Wright, Jr. Nicholas Haemel Graham Sellers Benjamin Lipchak

Craig Peeper Software Architect Windows Graphics & Gaming Technologies Microsoft Corporation

PowerVR Hardware. Architecture Overview for Developers

RenderMonkey 1.6. Natalya Tatarchuk ATI Research

NVIDIA Developer Toolkit. March 2005

White Paper. Solid Wireframe. February 2007 WP _v01

Transcription:

Appendix A Chapter Answers This appendix provides answers to all of the book s chapter review questions. Chapter 1 1. What was the original name for the first version of DirectX? B. Games SDK 2. Which is not a feature of DirectX 11? A. Fixed-function rendering pipeline 3. Which version of DirectX does the Xbox 360 use? C. A modified version of DirectX 9 4. DirectCompute was introduced in which version of DirectX? A. DirectX 11 5. DirectX 11 introduces which shader model? C. Shader Model 5.0 6. Which stage appears after the pixel shader? B. Output merger 7. The DirectX Control Panel is? D. Used to examine component properties 1

2 Appendix A n Chapter Answers 8. The Game Definition File is used for what purpose? D. For creating localization files for the Games Explorer 9. PIX is what type of tool within the DirectX SDK? A. Used for performance analysis 10. How many stages did we discuss for Direct3D 11? C. 9 11. Geometry shaders are used for tessellation (true or false). 12. The geometry shader stage occurs before the vertex stage and after the pixel stage (true or false). 13. DirectX 11 requires Windows Vista or higher (true or false). A. True 14. The Xbox 360 uses a variation of DirectX 10 (true or false). 15. Compute shaders is a new shader type in DirectX 11 for general-purpose computing (true or false). A. True Chapter 2 1. Which of the following is a Direct3D device type? E. All of the above 2. The view port does what? B. Defines the area of the window that is drawn to 3. What are swap chains? D. A collection of rendering destinations displayed to the screen

Chapter 2 3 4. Presenting the rendered scene is done with the Present method. Which object does Present belong to? A. Swap chains 5. What are render targets? B. A texture that is the destination of a rendering output 6. What feature levels did the Blank Window demo support? E. Both A and B and Direct3D 10.1 7. What is a WARP device? C. A fast software-rendering device. 8. How are Direct3D objects freed? B. Calling the COM object s Release method 9. How can we create a full-screen Direct3D window? D. Set the Windowed property of the swap chain description to false 10. What is the purpose of the DirectX Error Handling Library? A. Debug output 11. True or False: auto_ptr<> is exception safe A. True 12. True or False: WinMain has Unicode parameters A. True 13. True or False: The operator dynamic_cast<> offers run-time safety 14. True or False: The operator static_cast<> is used to cast static variables 15. True or False: DXTRACE_MSG displays a string to a message box

4 Appendix A n Chapter Answers Chapter 3 1. Define what a texture is. A. A texture is an image that is mapped onto the surface of our geometry. 2. Define what a sprite is. How are sprites different from textures? A. A sprite is a 2D textured rectangle that usually represents a game object or interface element. A texture is an image, while a sprite is, in our case, a game element or object. 3. List at least five different types of textures we ve mentioned in this chapter. A. Decal (color) maps, normal maps, height maps, specular (gloss) maps, cube maps, etc. 4. How many bits are RGB images? How many bits are RGBA images? A. RGB images has 24 bits (8 bits per component), while RGBA has 32 bits. 5. Define a vertex. A. A vertex is an element of a primitive that has a list of attributes associated with it. These attributes can be positions, texture coordinates, colors, and so forth. 6. Define a triangle. A. A triangle is a polygon that has three connected vertex points. 7. What is the purpose of a vertex buffer? What is the Direct3D 11 object type of buffers? A. Buffers in Direct3D are of the type ID3D11Buffer. A vertex buffer is used to store the vertex points that make up a geometry object. 8. List at least five attributes of a vertex. A. Position, color, texture coordinate, normal, s-tangent, bi-normal, etc. 9. Define an input layout and what it is used for in Direct3D. A. The input layout describes the layout of the geometry being submitted to the rendering API. The API uses this to know how the data is laid out.

Chapter 3 5 10. What is a vertex shader and what Direct3D function is used to set (apply) one? A. A vertex shader is code executed (in hardware) on each vertex that is processed. Vertex shaders are set with a call to VSSetShader. 11. What is a pixel shader, and what Direct3D function is used to set (apply) one? A. A pixel shader is code that is executed (in hardware) on each screen fragment that is processed. Pixel shaders are set with a call to PSSetShader. 12. List at least three input assembler functions we ve used in the rendering functions of our demos. A. IASetInputLayout, IASetVertexBuffers, andiasetprimitivetopology. 13. What are MIP levels? A. Mip levels are lower-resolution versions of an image. 14. What are sampler states, and what is their purpose in Direct3D and HLSL? A. A sampler state is a set of states that dictates how a texture will be sampled (information fetched from it). It is used in HLSL along with its Sample function to return a value from the texture. 15. What are blend states, and for what purpose did we use them in this chapter? A. Blend states are states that drive how colors are blended as they are rendered. We used them in this chapter for creating transparency with images that define an alpha channel. 16. Define matrices. A. A matrix is a series of values that represents a transformation. 17. What are the various matrices that make up the model-view projection matrix, and what are their purposes? A. The world-model matrix is the matrix that transforms data from local-space to world-space, the view matrix simulates a camera and is

6 Appendix A n Chapter Answers used to transform data to view-space, and the projection matrix applies a projection to the data when going to screen-space. 18. What are texture address modes? Define each mode of the D3D11 TEXTURE_ADDRESS_MODE enumeration. A. WRAP will repeat texture coordinates greater than 1.0, MIRROR will show a mirror image as it repeats, MIRROR ONCE will mirror the image only once, CLAMP will clamp the texture coordinates between 0.0 and 1.0, and BORDER will display a border color in areas outside of the 0.0 to 1.0 range. 19. Enabling alpha transparency required us to create and set what Direct3D 11 object? A. ID3D11BlendState. 20. Why did we decide to use XMFLOAT4X4 instead of XMMATRIX as the class member in the Game Sprite demo? A. We did not use an XMFLOAT4X4 instead of an XMMATRIX. Chapter 4 1. What is another term for textured fonts? C. Bitmap font 2. What is a font? A. A style of characters. 3. True or False: Static text is best displayed using texture-mapped surfaces, not dynamically created sprites. A. True 4. True or false: Write/discard map types must use the D3D11_MAP_FLAG_ DO_NOT_WAIT flag. 5. True or False: Direct3D has built-in text rendering.

Chapter 6 7 Chapter 5 1. DirectInput allows for what type of input devices? A. Keyboards, mice, and game controllers. 2. Which function creates the IDirectInput8 interface? A. DirectInput8Create. 3. Reading from the keyboard requires what kind of buffer? A. 256-character array. 4. What is the data format type for mouse input? A. c_dfdimouse or c_dfdimouse2. 5. Which function is used to get the current data from a controller? A. XInputGetState. 6. How many controllers can be used at a time? A. Four. 7. How is controller removal detected? A. If XInputGetState returns ERROR_DEVICE_NOT_CONNECTED. 8. How is user input from a controller disabled? A. XInputEnable. 9. Which structure is used to gather user input? A. XINPUT_GAMEPAD. 10. What XInput function allows you to set the vibration of a game controller? A. XInputSetState. Chapter 6 1. Define a vector. A. A vector is a direction with a magnitude.

8 Appendix A n Chapter Answers 2. Define a matrix. A. A matrix is a table of numbers that represents a system. 3. What is the difference between XMVECTOR and XMFLOAT4? A. XMVECTOR maps directly to hardware registers and is memory aligned. 4. What is the difference between XMFLOAT4 and XMFLOAT4A? A. XMFLOAT4A is byte aligned. 5. How is a point defined in a 3D coordinate system? A. Using X, Y, and Z axes. 6. What does normalizing a vector do? A. Returns a vector with a length that equals 1. 7. What is the purpose of the dot product calculation? A. The dot product, also known as the scalar product, is used to determine the angle between two vectors. 8. What primitive type consists of a series of connected lines? A. Triangle. 9. What is the identity matrix? A. A matrix that applies no scaling, rotation, or translation. 10. What is another term for multiplying matrices? A. Concatenation. Chapter 7 1. Effect files are loaded using which function? A. D3DXCreateEffectFileFromMemory. 2. What is HLSL? A. Direct3D s High Level Shading Language used to create shaders. 3. What is the purpose of a geometry shader? A. Geometry shaders operate per-primitive.

Chapter 8 9 4. What is the purpose of domain and hull shaders? A. They are used to work with the tessellation stage where the hull and domain stages are programmable, but the tessellator is not. 5. What are the two modes the rasterizer can operate in? A. Wireframe or solid. 6. Define semantics. A. It binds shader variables to an input or output register. 7. What are compute shaders, and what is the lowest version that can be used? A. Compute shaders allow for general-purpose programming via the graphics hardware. You can use them with shader model 4.0, although they were introduced with Direct3D 11. 8. Define HLSL techniques and passes. A. An HLSL technique describes the various states and shaders used for a specific effect within an HLSL source file. A pass is a simple rendering pass of the effect. A technique can have one or more passes performed. 9. What is the fixed function pipeline? How does Direct3D 11 make use of it? A. The fixed function pipeline is generally a set of states and fixed algorithms that pre-direct3d 10 APIs used. Since Direct3D 10, only shaders are used for rendering, and the fixed function pipeline is no more. 10. What is the tessellator unit used for? A. To generate polygonal geometry from surface information. Chapter 8 1. What is a stationary camera? A. Its purpose is to sit at a location and look at a target. It is essentially simply a look-at camera.

10 Appendix A n Chapter Answers 2. What two types of stationary cameras did we discuss? A. A stationary camera can be fixed-position or dynamic fixed-position. A fixed-position camera has its position set upon creation, while a dynamic fixed-position camera can have its position dropped at various locations as needed. 3. What is an arc-ball camera? A. A camera that rotates around a target while limiting its X axis rotation (up and down movement) to an arc. 4. True or False: The OBJ file is a binary file for 3D models. A. False. 5. Describe what a token stream is. A. In this chapter we used it to break a file into tokens, which are essentially blocks of text separated by delimiters. Appendix B 1. What is XAudio2? A. XAudio2 is a low-level sound API that is part of the DirectX SDK and the Xbox 360 s XDK. 2. What is XACT3? A. XACT3 is a high-level audio API and set of tools. 3. Name the three tools of XACT3. A. The API, the GUI editor, and the command-line tool. 4. Why does XACT3 build content in a Windows and an Xbox folder? A. Because the two platforms require different byte ordering. 5. Name and describe the three different types of audio banks in XACT3. A. Sound banks that store sounds and cues, in-memory wave banks that store the wave audio data to be loaded in-memory, and streaming wave banks for streaming audio content.

Appendix B 11 6. What is a source voice? A. A source voice is used to submit audio for processing from a data source. 7. What is a submix voice? A. A submix voice is used for effects processing and mixing of audio channels. 8. What is a mastering voice? A. A mastering voice is the voice that allows audio to be heard. A mastering voice cannot have data sent directly to it and must receive its data from a source voice or a submix voice. 9. Which voice is necessary for audio to be heard in XAudio2? A. A mastering voice. 10. Name two prior audio APIs that were part of the DirectX SDK before XAudio2 and XACT3. A. DirectMusic and DirectSound.