Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // the streamoutbuffer with the coords
- ByteAddressBuffer sobCoords;
- // the filtered indices
- StructuredBuffer<uint> sbIndex;
- int elementcount;
- RWStructuredBuffer<uint> buffer : BACKBUFFER;
- [numthreads(64, 1, 1)]
- void CS( uint3 i : SV_DispatchThreadID)
- {
- if (i.x >= asuint(elementcount)) { return;}
- uint idx = sbIndex[i.x];
- float x = asfloat(sobCoords.Load(idx * 24));
- float y = asfloat(sobCoords.Load(idx * 24 + 4));
- float z = asfloat(sobCoords.Load(idx * 24 + 8));
- float w = asfloat(sobCoords.Load(idx * 24 + 12));
- /* some more code here that is irrelevant*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement