138 GPGPU Programming for Games and Science
stores integer indices (16-bit or 32-bit) into the vertex buffer interpreted as
an array of structures. When the corresponding D3D11 draw call is made, the
vertices are processed by calls to
VSMain.Whenanentireprimitiveisready,
say, the three vertices of a triangle have been processed by the vertex shader
calls, the rasterizer identifies the pixels owned by the triangle and calls
PSMain
for each owned pixel.
In the texturing example, the model-space texture coordinates are passed
through by the vertex shader. The rasterizer then interpolates these coordi-
nates and passes them to the pixel shader so that the 2D texture can be sam-
pled to obtain a color. The
baseTexture object is a read-only texture that the
progr ...