Skip to content

Commit

Permalink
Demonstrate Issue theproadam#10
Browse files Browse the repository at this point in the history
  • Loading branch information
kf6kjg committed Aug 2, 2021
1 parent 9b1f4b9 commit 49878ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions source/texturetest/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@ unsafe void CubeFS(byte* BGR, float* Attributes, int Index)
int U = (int)(Clamp01(Attributes[0]) * textureWidthMinusOne);
int V = (int)(Clamp01(Attributes[1]) * textureHeightMinusOne);

if (float.IsNaN(Attributes[0]) || float.IsNaN(Attributes[1]))
{
BGR[0] = 255;
BGR[1] = 0;
BGR[2] = 0;
return; // Set a breakpoint here to catch issue #10 in the act.
}

*((int*)BGR) = TEXTURE_ADDR[U + V * textureHeight];
}

Expand Down

0 comments on commit 49878ba

Please sign in to comment.