Skip to Content
GPU Pro 6
book

GPU Pro 6

by Wolfgang Engel
July 2015
Intermediate to advanced
586 pages
17h 21m
English
A K Peters/CRC Press
Content preview from GPU Pro 6
96 II Rendering
#d e f i n e THREAD GROUP SIZE 64
RWStructuredBuffer<uint> QuantizedLODDistance : register( u6 );
RWStructuredBuffer<uint> LODSortedStrandIndex : register( u7 );
// cameraPos , cameraDir , and maxDist are given through
// const buffer .
[ numthreads ( THREAD_GROUP_SIZE ,1,1)]
void ComputeCameraDistance ( uint GIndex : SV_GroupIndex ,
uint3 GId : SV_GroupID ,
uint3 DTid : SV_DispatchThreadID )
{
uint globalBladedIndex , globalRootVertexIndex ;
// Calculate indices above here .
float4 pos = g_HairVertexPositions [ globalRootVertexIndex +1];
float dist = dot (( pos . xyz cameraPos . xyz), cameraDir . xyz );
// Perform frustum culling and ass ...
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

GPU Pro 4

GPU Pro 4

Wolfgang Engel
GPU Pro 5

GPU Pro 5

Wolfgang Engel
GPU Pro 7

GPU Pro 7

Wolfgang Engel
GPU PRO 3

GPU PRO 3

Wolfgang Engel

Publisher Resources

ISBN: 9781482264623