Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/122

Click to flip

122 Cards in this Set

  • Front
  • Back
What does MSAA stand for?
Multi Sample Anti Aliasing
What is the exact name of the interface the allows you to create and manage a "Back-buffer" which can be rendered to by D3D11 and then displayed to the user?
IDXGISwapChain
You are meant to directly read the individual components of a XMMATRIX without any type conversions. For example, the code below would be considered valid.

XMMATRIX m = XMMatrixIdentity();
m._42 += 3 // move y position up 3 units
False
What is the purpose of the ID3D11InputLayout?

a. It describes the elements within a vertex structure by defining their locations and memory formats.
b. Describes the GPU and CPU memory access restrictions of a specific ID3D11Buffer.
c. Is used by the ID3D11Device to communicate raster data to the "Front-buffer".
d.It lays out keyboard settings and input.
a. It describes the elements within a vertex structure by defining their locations and memory formats.
The ID3D11Device is used to send drawing commands to the video card immediately.
False
What is the purpose of the "D3D11_SUBRESOURCE_DATA" structure?

a. Allows you to draw to a different part of the IDXGISwapChain.
b. MUST be provided to the "ID3D11Device::CreateBuffer" function, not optional.
c. Used to rewrite an immutable shared data block.
d. Used to populate the initial contents of a ID3D11Buffer.
d. Used to populate the initial contents of a ID3D11Buffer.
Unlike Textures which are ______________, ID3D11Buffers are always considered to be ______________.

Only One-Dimensional
Only Two-Dimensional
Multi-Dimensional
Multi-Dimensional, Only One-Dimensional
a. Dot Product
b. Vector Addition
c. Cross Product
d. Vector Subtraction
a. Dot Product
b. Vector Addition
c. Cross Product
d. Vector Subtraction
a. Dot Product
a. Aligns the array to be on a 15bit sequential memory boundry.

b. Automatically calculates the byte offset of the element from the start of the structure.

c. Describes the winding of the preceding format.

d.Appends a vertex to an element index b
a. Aligns the array to be on a 15bit sequential memory boundry.
b. Automatically calculates the byte offset of the element from the start of the structure.
c. Describes the winding of the preceding format.
d.Appends a vertex to an element index buffer.
b. Automatically calculates the byte offset of the element from the start of the structure.
a. Scissor Testing
b. Stencil Testing
c. Alpha Testing
d. Depth Testing

1. Use to test and/or track specific/custom relationships.
2. Used to perform hidden surface removal.
3.Limit Fragments/Pixels to a specific rectangle on screen.
4. Rejects Fragments/Pixels based on their transparency.
a -> 3
b -> 1
c -> 4
d -> 2
A world space matrix defines how an object relates to the rest of the global space around it. This means that usually we'll want a separate world matrix for each unique object in out scene.
True
An ID3D11InputLayout must be checked against the compiled byte-code of a pixel shader before being created.
False
An orthographic projection has no perspective distortion. This is because the projection is parellel to the view direction.
True
The Input Assembler Stage is an example of a:

a. Fixed-Function Stage
b. Encrypted Stage
c. Programmable Stage
d. Optional Stage
a. Fixed-Function Stage
Assuming you have a non-singular 4x4 matrix (A), if we take the inverse of (A) and call it (B) then what kind of matrix would the following matrix multiply yield?

B X A = ?

a. A Skew Matrix
b. A Translation Matrix
c. A Matrix with all zeros
d. A Rotation Matrix
e. An Identity Matrix
e. An Identity Matrix
When multiplying a 3D Vector by a 4x4 Matrix we must be aware of the W(xyzw) component of that vector during the transformation.

If the 3D vector is a position then what value should we set the W component to before multiplying?
1
To create a shader, we need to send the shaders byte-code to the device using a method like CreateVertexShader(). The byte-code we give it is:

a. A pointer to our intact HLSL source code.
b. Our HLSL code compiled int assembly GPU instructions.
c. Our HLSL source file digitally compressed to save space in VRAM.
d. Our HLSL code with white space removed to save space in VRAM.
b. Our HLSL code compiled int assembly GPU instructions.
In order to draw your geometry in wire-frame mode, you must create a ________________ object with the proper settings and apply it before drawing.
ID3D11RasterState.
Assuming you have a non-singular 4x4 martix (A), if we take the inverse of (A) and call it (B) then what kind of matrix would the following matrix multiply yield?
B x A = ?

a. Rotation Matrix
b. Translation Matrix
c. Identity Matrix
d. A Matrix with All Zeros
E. A Skew Matrix
C. Identity Matrix
An orthographic projection has no perspective distortion. This is because the projection is parallel to the view direction.

True or False
True
Given a back-buffer resolution of 640(width) x 480(height) which of the following would be the correct aspect ration to provide the Projection Matrix? (use a calculator if required)

a. 1120
b. 0.75
c. 160
d. 307200
e. 1.3333333333
e. 1.3333333333
In order to render properly in 3D and enable per-pixel depth sorting you must create a particular kind of __________________ object that has the same dimensions as the backbuffer and then bind it to the pipeline using _________________________ which you must also create.
ID3D11Texture2D & ID3D11DepthStencileView
The Output Merger Stage has write access to VRAM.

True or False
True
A vertex shader contains a custom HLSL function, this is invoked _________________ for each __________ that comes into the vertex shader.
1 time & vertex
The Input Assembler Stage is an example of a:

a. Fixed-Function Stage
b. Programmable Stage
c. Optional Stage
d. Encrypted Stage
a. Fixed-Function Stage
What is the name of the last Programmable Stage?
Pixel Shader
When we call d3dDevice->CreateDepthStencileView(), it expects a pointer to the ID3D11Resource, a pointer to a D3D11_DEPTH_STENCIL_VIEW_DESC, and a double pointer to an ID3D11DepthStencilView. We can pass NULL to which one of these parameters and why?

a. The D3D11_DEPTH_STENCIL_VIEW_DESC, because it will create a default view description for us.
b. The ID3D11Resource, because we already have a back buffer and don't need a depth buffer.
c. The ID3D11DepthStencilView, because it will just use the render target view we already have as a default
a. The D3D11_DEPTH_STENCIL_VIEW_DESC, because it will create a default view description for us.
To create a shader, we need to send the shaders bytecode to the device using a method like CreateVertexShader(). The bytecode we give it is:

a. A pointer to our intact HLSL source doe
b. Our HLSL source file digitally compressed to save space in VRAM
c. Our HLSL code compiled into assembly GPU instructions
d. Our HLSL code with white space removed to save space in VRAM
c. Our HLSL code compiled into assembly GPU instructions
To control the filter of color data from a texture inside a pixel shader you will need to create a _____________________ object on the C++ side and assign it to the Pixel Shader stage.
ID3D11SamplerState
The ___________________________ Interface is often use to enable various pipeline stages to read data from a Texture or Buffer.
ID1D11ShaderResourceView
What is the name of the function belonging to a deferred ID3D11DeviceContext that is used to complete the recording of a ID3DCommandList?
Hint: Usually the last function called at the end of a separate rendering thread
FinishCommandList
In HLSL, the TextureCube resource object is a type of 3D texute. As such, it's shader resource view must be a Texture3D.

True or False
False
The default D3D11 Sampler UV addressing mode is:

a. Mirror
b. Clamp
c. Border
d. Wrap
d. Wrap
Match each D3D11 Interface with its purpose in a multi-threaded rendering environment

1. ID3D11DeviceContext[Deferred]
2. ID3D11DeviceContext[Immediate]
3. ID3D11Device
4. ID3D11CommandList

a. Used to asynchronously load resources
b. Stores optimized changes to pipeline state for playback
c. Lets you dispatch pipeline commands directly to the view card
d.Tracks pipeline modifications that can be recorded for later use
1. ID3D11DeviceContext[Deferred]: d.Tracks pipeline modifications that can be recorded for later use

2. ID3D11DeviceContext[Immediate]: c. Lets you dispatch pipeline commands directly to the view card

3. ID3D11Device: a. Used to asynchronously load resources

4. ID3D11CommandList: b. Stores optimized changes to pipeline state for playback
A Deferred Context used to record pipeline commands on a separate thread is considered thread safe.

True or False
False
deferredContext->IASetIndexBuffer(theApp->cubelBuffer, DXGI_FORMAT_R16_UINT, 0);

The above code is binding an index buffer to the Input Assembler stage. What is the C++ *type* that defines each individual index variable?
unsigned short
Texture Space and 3D Space (local, world, view, projection) are directly linted. When you change one you change the other.

True or False
False
deferredContext->IASetIndexBuffer(theApp->cubelBuffer, DXGI_FORMAT_R32_UINT, 0);

The above code is binding an index buffer to the Input Assembler stage. What is the C++ *type* that defines each individual index variable?
unsigned int
What does GPU stand for?
Graphics Processing Unit.
Constant Buffers are used for:
Sending information from your application to your shaders.
What is the purpose of the ID3D11InputLayout?
It describes the elements within a vertex structure by defining their locations and memory formats.
The ID3D11Device is used to send drawing commands to the video card immediately.

True or False
False.
When relating graphics why is it so common that the 3x3 portion of a matrix be an orthonormal
set?
“Orthogonal matrices preserve lengths and angles when sued to transform vectors.”
Match each fragment test on the left to its intended purpose on the right.

1. Alpha Testing
2. Stencil Testing
3. Scissor Testing
4. Depth Testing

a. Limit Fragments/Pixels to a specific rectangle on screen.
b. Use to test and/or track specific/custom relationships.
c. Used to perform hidden surface removal.
d. Rejects Fragments/Pixels based on their transparency.
Alpha Testing – Rejects Fragments/Pixels based on their transparency.

Stencil Testing – Use to test and/or track specific/custom relationships.

Scissor Testing – Limit Fragments/Pixels to a specific rectangle on screen.

Depth Testing – Used to perform hidden surface removal.
What is the exact name of the Interface that allows you to create and manage a “Back-buffer”
which can be rendered by D3D11 and then displayed to the user?
IDXGISwapChain.
When we call d3dDevice->CreateDepthStencilView(), it expects a pointer to a ID3D11Resource,
a pointer to a D3D11_DEPTH_STENCIL_VIEW_DESC, and a double pointer to a
ID3D11DepthStencilView. We can pass NULL to which one of the parameters and why?

a. The ID3D11DepthStencilView, because it will just use the render target view we already have as a default.
b. The ID3D11Resource, because we already have a back buffer and don't need a depth buffer.
c. The D3D11_DEPTH_STENCIL_VIEW_DESC, because it will create a default view description for us.
c. The D3D11_DEPTH_STENCIL_VIEW_DESC, because it will create a default view description for us.
An ID3D11InputLayout must be checked against the compiled byte-code of a pixel shader before
being created.

True or False
False.
What is wrong with the below HLSL vertex shader code assuming “worldViewProj” is a valid
matrix?
struct BASIC_VERTEX
{
float3 posL : POSITION;
};
float4 posH : SV_POSITION;
};
VS_OUTPUT main( BASIC_VERTEX input)
{
VS_OUTPUT output;
Output.posH = mul(float4(input.posL,0),worldViewProj);
return output;
}
The 0 after “input.posL” should actually be a 1.
Texture Space and 3D Space (local, world, view, projection) are directly linked. When you
change one you the other.

True or False
False
In HLSL, the TextureCube resource object is a type of 3D texture. As such, it’s shader resource
view must be a Texture3D.

True or False
False
Every programmable stage can access textures.

True or False
True
A Deferred Context used to record pipeline commands on a separate thread is considered
thread safe.

True or False
False
If we had two world spaces matricies ( matrix A and matrix B) and we wanted to move with matrix A into the same space as matrix B, we need to make a __________________ matrix from B's world space matrix and multiply that with matrix A. To make any world space matrix into a _________________ matrix or vice versa we simply need to _______________________.
[1]____________? not projection space
[2] view space
[3] inverse it
An orthographic projection has no perspective distortion. This is because the projection is parallel to the view direction.

True or False
True
In order to draw your geometry in wire-frame mode, you must create a ________________ object with the proper settings and apply it before drawing.
ID3D11RasterizerState
An ID3D11InputLayout must be checked against the compiled byte-code of a pixel shader before being created.

True or False
False
What term (one word) is used to describe what happens when three data points form a triangle's vertices are combined to form a single data point for each rasterized pixel?
Hint: This is done for you by the Rasterizer Stage
Hint2: By default this occurs to each parameter coming into the pixel shader
Interpolation
texture2D<float4> myTexture : register(t2);

In the above HLSL pixel shader code, what is the purpose of ":register(t2)"?

a. The command enables HLSL to allocate a minimum of 2MB of VRAM to caching texture data from this texture
b. The command enables HLSL to allocate a maximum of 2MB of VRAM to caching texture data from this texture
c. Identifies this texture as residing on the third texture slot in the pipeline
d. the code "registers" a secondary name of "t2" to the variable
e. Identifies this texture as residing on the second texture slot in the pipeline.
c. Identifies this texture as residing on the third texture slot in the pipeline
The process of rasterization is the conversion of ____________ data to ______________ data.
[1] vector
[2] raster
Unlike Textures which are _______________________, ID3D11Buffers are always considered to be ______________________.
[1] Multi-Dimensional
[2] Only One-Dimensional
You are meant to directly read the individual components of a XMMATRIX without any type conversions. For example: This code below would be considered valid.
XMMATRIX m = XMMatrixIdentity();
m_42 += 3; //move Y position up 3 units

True or False
False
The D3D11 API *can* provide a software driver fall-back. Even if no direct hardware acceleration is able

True or False
True
D3D11_INPUT_ELEMENT_DESC theArray[ ] =
{
{"POSITION", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALLIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0},
{"COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALLIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0},
{"TEXCOORD", 0, DXGI_FORMAT_R32_UINT, 0, D3D11_APPEND_ALLIGNED_ELEMENT, D3D11_INPUT_PER_VERTEX_DATA, 0},
}

In the above code, what does "D3D11_APPEND_ALLIGNED_ELEMENT" do?
a. Automatically calculates the byte offset of the element from the start of the structure.
b. Appends a vertex to an element index buffer
c. Describes the winding of the preceding format
d. Aligns the array to be on a 15bit sequential memory boundry
a. Automatically calculates the byte offset of the element from the start of the structure.
D3D11_MAPPED_SUBRESOURCE edit;
immediateContext->Map(shadeData, 0, D3D11_MAP_WRITE_DISCARD, 0, &edit);
memcpy(edit.pData, SHAPE_DATA::allShapes, sizeof(SHAPE_INFO)*MAX_SHAPES);
immediate Context->Unmap(shapeData, 0);
What does the above code do?
a. It is mapping a vertex buffer to the Input Assembler state.
b. Is most likely updating a dynamic constant buffer in a shader.
c. Is probably unloading a vertex buffer from memory.
d. Copies various shape data directly to the Backbuffer
b. Is most likely updating a dynamic constant buffer in a shader.
UINT stride = sizeof(MY_VERTEX), offset = 0;
immediateContext->IASetVertexBuffers(0, 1, &vertexBuffer.p, &stride, &offset);
immediateContext->IASetInputLayout(vertexFormat);
immediateContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
immediateContext->VSSetShader(vertexShader, NULL,0);
immediateContext->PSSetShader(pixelShader, NULL, 0);
ID3D11Vuffer* buffers[] = {cb1Data, cb2Data};
immediateContext->VSSetConstantBuffers(0,2,buffers);

The above code seems to indicate we are about to do what?
a. Clear the RenderTargetView
b. Present the contents of the SwapChain.
c. Update a Constant Buffer
d. Draw Something
d. Draw Something
Constant buffers are used for:
a.Used to convert the simple shapes drawn by D3D11(points ,lines, triangles) into more complex shapes(quads, spheres, grids, octagons)
b. Sending information from your application to your shaders.
c. An enormous list of pre-defined(by Microsoft) D3D11 specific variables that you can use as needed.
d. Used only to store variables that never change during the life of the program.
e. Used to "Buffer" vertex information so it is accessed faster
b. Sending information from your application to your shaders.
When multiplying a 3D Vector by a 4x4 Matrix we must be aware of the W(xyzw) component of that vector during the transformation.

If the 3D vector is a *direction* then what value should we set the W component to before multiplying?
0
What is the name of the space that defines how the vertices within a single mesh are relative to one another?
Local Space
To move along a matricie's Local Z, we would take the Z axis of the matrix, multiply that by the position, and add it to the Z axis.

True or False
False
To be able to use a shader you must first compile it and then load the compiled byte-code into VRAM. This means that you cannot load the HLSL source code direction onto the hardware

True or False
True
What is the name of the last PROGRAMMABLE stage?
Pixel Shader
Regardless of how many verticies you choose to share across your cube with an index buffer....
When creating a 3D cube using a triangle list, how many total indicies will you need exactly to represent all faces of the cube?
36
Match each type of texture to what it is commonly used for:

1. 1D
2. CUBE [2D Array of 6]
3. 2D
4. 3D

a. Volumetric Textures/Complex Data Storage
b. Diffuse Maps/Normal Maps/Specular Maps
c. Cell Shading/Gradients
d. Reflection Maps/Environment Maps
1. 1D: c. Cell Shading/Gradients

2. CUBE [2D Array of 6]: d. Reflection Maps/Environment Maps

3. 2D: b. Diffuse Maps/Normal Maps/Specular Maps

4. 3D: a. Volumetric Textures/Complex Data Storage
The _________________________ Interface is often used to enable various pipeline stages to read data from Texture or Buffer
ID3D11ShaderResourceView
The rasterizer stage will convert __________________ coming down the pipeline into rasterized data. One of the other things the rasterizer stage can do is _______________________________________________________.
[1] Geometric Data
[2] clip primitives, which will discard the parts of a primitive that aren't fully on screen
Please choose the answer which best describes the above Input Layout.

a. The given layout will not work! It is using the "POSITION" semantic multiple times in the same buffer
b. This layout identifies SIX separate data streams used to construct a single vertex. It does not use instancing.
c. Describes two separate buffers, one which contains per vertex Position and UV data and another which contains 4 float4 vectors used once for each rendered instance
d. A single vertex buffer that contains positions, texture coordinates, and an entire 4x4 matrix for each vertex
c. Describes two separate buffers, one which contains per vertex Position and UV data and another which contains 4 float4 vectors used once for each rendered instance
____________________ interpolation is used to prevent distortion of UV coordinates and other per-vertex attribute data across the face of a triangle. This is important because a rasterized surface is not necessarily _________________ to the view direction of the camera
[1] Perspective-Correct
[2] Perpendicular
The Geometry Shader works on complete primitives only. Each primitive is passed as an array to the input of the GS.

At it's largest, this array will contain _________, which represents _________.
[1] 6 vertices
[2] one triangle with adjacency data
The Geometry Shader runs for every:

a. Vertex
d. Quad
c. Primitive
d. Pixel
e. Control
c. Primitive
What is the minimum number of vertices you must output from the Geometry Shader Stage?
0
What ID3D11 Object can you use to alter behaviors such as back-face culling and fill modes when drawing geometry?
ID3D11RasterizerState
an "ID3D11CommandList" generated from a deferred context is invalid after it is used once and must be released and cannot be reused.

True or False?
False
Match the Geometry Shader output stream type with the type of primitives produced:

1. inout PointStream<GSOutput>
2. inout TriangleStream<GSOutput>
3. inout LineStream<GSOutput>

a. D3D11_PRIMITIVE_TOPOLOGY_POINTLIST
b. D3D11_PRIMITIVE_TOPOLOGY_POINTSTRIP
c. D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST
d. D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP
e. D3D11_PRIMITIVE_TOPOLOGY_LINELIST
f. D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP
1. inout PointStream<GSOutput> -> a. D3D11_PRIMITIVE_TOPOLOGY_POINTLIST

2. inout TriangleStream<GSOutput> -> d. D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP

3. inout LineStream<GSOutput> -> f. D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP
The geometry Shader Stage can only receive input directly from the Vertex Shader Stage.

True or False?
False
The Geometry Shader must output the same type of primitive that it takes as input.

True or False?
False
Because of where the Geometry Shader falls in the pipeline, it needs to output vertices with what system value semantic?
SV_POSITION
One of the intrinsic matrix functions of HLSL is inverse() which returns the inverse of the matrix passed in.

True or False?
False
For a vertex to be unique, (in terms of using it in conjunction with an index buffer) all parts of the vertex must be unique (Position, Normal, UV) and may not be found in any other vertices residing in the same buffer.

True or False?
False
What key operation is used to calculate the direction perpendicular to the plane of a triangle if we have two vectors parallel to its surface?

a. Planar Intersection
b. Triangulation
c. Vector Addition
d. Cross Product
e. Dot Product
d. Cross Product
Imagine a 3D cube aligned to the world space XYZ axis (no rotation). Match each side of the cube to the correct normal that should be used to light that face. If it helps, omagine that you are located somewhere on the -Z axis looking down the +Z axis where you can see the front face of the cube.

1. Right Face
2. Top Face
3. Front Face
4. Back Face
5. Bottom Face
6. Left Face

a. {0, 0, 1}
b. {1, 0, 0}
c. {0, -1, 0}
d. {0, 0, -1}
e. {-1, 0, 0}
f. {0, 1, 0}
1. Right Face b. {1, 0, 0}
2. Top Face f. {0, 1, 0}
3. Front Face a. {0, 0, -1}
4. Back Face d. {0, 0, 1}
5. Bottom Face c. {0, -1, 0}
6. Left Face e. {-1, 0, 0}
float4 surfaceColor = baseTexture.Sample( quality, uvIn );
float4 result = lightColor * surfaceColor;
return result;

Carefully examine the above HLSL code. What kind of light is being calculated?

a. Ambient Light
b. Point Light
c. Eliptical Light
d. Spot Light
e. Directional Light
a. Ambient Light
float4 surfaceColor = baseTexture.Sample( quality, uvIn );
float4 result = saturate(dot(normalize(-lightDir), normalize(wNrm))) * lightColor * surfaceColor;
return result;

Carefully examine the above HLSL code. What kind of light is being calculated?

a. Ambient Light
b. Point Light
c. Eliptical Light
d. Spot Light
e. Directional Light
e. Directional Light
float4 surfaceColor = baseTexture.Sample( quality, uvIn );
float3 lightDir = normalize(lightPos - wPos);
float4 lightRatio = saturate(dot(normalize(-lightDir), normalize(wNrm)));
float attenuation = 1 - saturate( length(lightPos - wPos) / lightRadius );
float4 result = lightRation * lightColor * surfaceColor * attenuation;
return result;

Carefully examine the above HLSL code. What kind of light is being calculated?

a. Ambient Light
b. Point Light
c. Eliptical Light
d. Spot Light
e. Directional Light
b. Point Light
Typically normal data is stored in local/object space, and light data is stored in world space. Inorder to perform lighting calculations you must either convert your normals into world space or move your lights into local/object space.

True or False?
True
Compared to DirectX, how are texture coordinates represented in a typical OBJ file?

a. No Conversion is required, they use the exact same texture coordinate system.

b. The U(x) component is the same, but the V(y) component is inverted.

c. Both the U(x) and V(y) components are inverted compared to DirectX.

d. The V(y) component is the same but the U(x) component is inverted.
b. The U(x) component is the same, but the V(y) component is inverted.
float4 surfaceColor = baseTexture.Sample( quality, uvIn );
float3 lightDir = normalize(lightPos - wPos);
float surfaceRatio = saturate( dot( -lightDir, normalize(cDir)));
float factor = 1 - saturate( ( cInnerRatio - surfaceRatio ) / ( cInnerRatio - cOuterRatio ) );
float4 lightRatio = saturate(dot(normalize(-lightDir), normalize(wNrm)));
float attenuation = 1 - saturate( length(lightPos - wPos) / lightRadius );
float4 result = lightRatio * lightColor * surfaceColor * attenuation * factor;
return result;

Carefully examine the above HLSL code. What kind of light is being calculated?

a. Ambient Light
b. Point Light
c. Eliptical Light
d. Spot Light
e. Directional Light
d. Spot Light
OBJ Model files contain a specific header you must read before parsing the contents of the file.

True or False?
False
What does SRV stand for? As in "D3D11_SRV_DIMENSION_TEXTURE2D".
Shader Resource View
What part of the back-buffer is the above viewport designed to draw to?

a. This viewport spans the entire back-buffer

b. This viewport will draw to the center of the back-buffer with 1/4 size border surrounding the edge

c. The given viewport is invalid, it will draw out-of-bounds of the indicated Render Target.

d. This viewport will draw to the lower right quadrant of the back-buffer,
c. The given viewport is invalid, it will draw out-of-bounds of the indicated Render Target.
What is the exact name of the ID3D11DeviceContext function used to make a mip-map chain from a Render Target so you can use it on a 3D object?
GenerateMips
Render Targets and Viewports don't alter HOW soemthing is render. They exist to modify WHERE something is rendered.

True or False?
True
Viewports in D3D11 can only be used to sub-divide the Back-Buffer managed by the IDXGISwapChain.

True or False?
False
A Render Target is a special kind of ___________ which D3D11 can draw to, and later use as a shader resource.
ID3D11Texture2D
What does RTV stand for? As in "D3D11_RTV_DIMENSION_TEXTURE2D".
Render Target View
Once you have drawn to a Render Target (and generated any needed mip-maps), you may have to bind it to the pipeline with an SRV and access it just as if it was a normal 2D texture you loaded from disk.

True or False?
True
Take the distance across clip space from left to right. (right-left)
Now multiply that number with the distance from top to bottom. (top-bottom)

What number do you get?
4
Shadow Maps work by rendering _______ information from the point of view of the _______ and the using that data to perform texture look-ups in the _______ as a point of comparison vs rasterized pixels affected by light.

Light
Camera
Depth

Vertex Shader
Pixel Shader
Geometry Shader
Depth, Light, Pixel Shader
Given that the above compute shader has been bound properly, how many individual threads (not thread groups) will run based on the shown "Dispatch" call?
Given that the above compute shader has been bound properly, how many individual threads (not thread groups) will run based on the shown "Dispatch" call?
4096
Match each type of Compute Shader memory model to its particular properties.

a. Buffer/Resource Memory
b. Thread Stack Memory
c. Group Shared Memory

1. Fast speed, small size, cross thread access, temporary data.
2. Slower speed, massive size, dross thread access, retained data.
3. Fastest speed, tiny size, single thread access, temporary data.
a. Buffer/Resource Memory -> 2. Slower speed, massive size, dross thread access, retained data.

b. Thread Stack Memory -> 3. Fastest speed, tiny size, single thread access, temporary data.

c. Group Shared Memory -> 1. Fast speed, small size, cross thread access, temporary data.
The Compute Shader was designed specifically to tackle rendering problems.

True or False?
False
If we wanted to disable writing comparison values to our Z buffer during rendering, or if we just wanted to alter Z testing/writing behavior in general, we would need to create a _______ object and tweak it to our specific needs.
ID3D11DepthStencilState
The Compute Shader's incredible performance potential comes from:

a. It's ability to tap directly in to the MATRIX
b. Compute Shaders let you hack the Gibson!
c. A single processor capable of extreme computing speeds.
d. The ability to process a significant amount of data in parallel.
e. MAGIC!!!
f. It's direct hardware access to CPU RAM
d. The ability to process a significant amount of data in parallel.
Match the HLSL buffer to the type of View used to bind it.

a. RWStructuredBuffer<MY_STRUCT> data : register(u0);
b. StructuredBuffer<MY_STRUCT> data : register(t0);

1. ID3D11UnorderedAccessView
2. ID3D11RenderTargetView
3. ID3D11ShaderResourceView
a. RWStructuredBuffer<MY_STRUCT> data : register(u0); -> 1. ID3D11UnorderedAccessView

b. StructuredBuffer<MY_STRUCT> data : register(t0); -> 3. ID3D11ShaderResourceView
Match the Buffer Type with it's intended use.

a. Byte Address Buffers ( Raw Buffers )
b. Append and Consume Buffers
c. Structured Buffers

1. A buffer Optimized for problems that operate in isolation and do not require any kind of cross thread synchronization.

2. Linear data not pre-defined by a DXGI format.

3. Access a generic data block where various elements could be stored in a non-linear fashion.
a. Byte Address Buffers ( Raw Buffers ) -> 3. Access a generic data block where various elements could be stored in a non-linear fashion.

b. Append and Consume Buffers -> 1. A buffer Optimized for problems that operate in isolation and do not require any kind of cross thread synchronization.

c. Structured Buffers -> 2. Linear data not pre-defined by a DXGI format.
A thread group is a ________ array of threads designed to work on a problem and utilize up to 32k of group shared memory.

a. 1D
b. 2D
c. 3D
d. 4D
e. 5D
f. 6D
c. 3D
Procedural systems can be challenging to build, thankfully HLSL has built randomization commands directly into the language.

True or False?
False
The above structure would return sizeof(HLSL_DATA) = 36 bytes when using normal 4-byte packing rules in C++. However HLSL cannot split variables across its register boundaries (each HLSL register == one float4). How many bytes will HLSL reserve for the above structure? Keep in mind HLSL forces 16 byte alignment.
48
When our geometry shader is using a single output stream, that stream is sent to the rasterizer. When we're using MORE THAN ONE OUTPUT STREAM, __________ of those streams are sent to the rasterizer. We may have UP TO _______________ total active output stream objects enabled at one time.
One

Four
What is the function of the SO(Stream Output) Stage?

a. This stage allows you to configure the type of primitive produced by a geometry shader.
b. Can be used as a way for the geometry shader to ouptut to a vertex buffer resource instead/as-well as directly to the rasterizer.
c. This stage is used to perform standardized fluid dynamics on vertex data before being sent to the rasterizer( Used to simulate a body of water, streams, etc...)
b. Can be used as a way for the geometry shader to ouptut to a vertex buffer resource instead/as-well as directly to the rasterizer.
How many verts do you need if you want to draw a single Quad with a non-indexed triangle-strip?
4
What is the name of the HLSL intrinsic command that forces a value specifically between 0.0 and 1.0?
saturate
If you want to display a completely different 3D scene on the 3D surface of yet another 3D scene what technique is commonly used to achieve this?

a. Render to Texture
b. Render to Back-Buffer
c. Quadratic Drawing
d. Orthographic projection
e. Viewports
Render To Texture