Skip to Content
GPGPU Programming for Games and Science
book

GPGPU Programming for Games and Science

by David H. Eberly
August 2014
Intermediate to advanced
469 pages
16h 30m
English
A K Peters/CRC Press
Content preview from GPGPU Programming for Games and Science
GPU Computing 153
mov o0 .w, v2 . x
mov o1 . xyz , v1 . xy zx
ret
// Approximately 4 instruction slots used
LISTING 4.9: The output assembly listing for the vertex shader of
Billboards.hlsl.
The input and output signatures are similar to what we have seen before,
except that the HLSL compiler has taken the liberty to optimize the output.
The
POSITION0 and TEXCOORD0 outputs are stored in the same register,
the position in the first three components (
xyz) and the billboard size in the
last component (
w). When the geometry shader consumes the vertex shader
output, only two registers per vertex are fetched rather than three if the
compiler had decided not to
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Graphics Gems V (IBM Version)

Graphics Gems V (IBM Version)

Alan W. Paeth
GPU Pro 6

GPU Pro 6

Wolfgang Engel

Publisher Resources

ISBN: 9781466595354