Skip to content

Commit

Permalink
increased precision and removed debugging lines
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemask committed Feb 5, 2014
1 parent a9e8342 commit 13f556a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions RadixSort.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ void main(
uint idx = DTid.x + DTid.y * c_width;

// populate the o array with the uint versions of this block
o[GI] = uint(dot(Input[idx], LumVector) * 255.0);
o[GI] = uint(dot(Input[idx], LumVector) * 0xFFFFFFFF);


// loop through each bit
for (int n = 0; n < 8; n++) {
for (int n = 0; n < 32; n++) {

// e is 1 where the nth bit is 0.
e[GI] = getBit(n, o[GI]) == 0;
Expand Down Expand Up @@ -117,12 +117,14 @@ void main(

uint mod = GI % 16;

/*
if (mod == 0 || mod == 16 || GI < 16) {
Result[DTid.xy] = float4(1, 0, 0, 1);
}
else {
Result[DTid.xy] = float(o[GI]) / 255.0;
}
*/
Result[DTid.xy] = float(o[GI]) / 0xFFFFFFFF;
//}

/*
if (GI == 0) {
Expand Down

0 comments on commit 13f556a

Please sign in to comment.