Exemple #1
0
 public LightSample(Sample sample, LightSampleOffsets offsets, int n)
 {
     Debug.Assert(n < sample.Num2D[offsets.PosOffset]);
     Debug.Assert(n < sample.Num1D[offsets.ComponentOffset]);
     UPos0      = sample.TwoD[offsets.PosOffset][2 * n];
     UPos1      = sample.TwoD[offsets.PosOffset][2 * n + 1];
     UComponent = sample.OneD[offsets.ComponentOffset][n];
     Debug.Assert(UPos0 >= 0.0f && UPos0 < 1.0f);
     Debug.Assert(UPos1 >= 0.0f && UPos1 < 1.0f);
     Debug.Assert(UComponent >= 0.0f && UComponent < 1.0f);
 }
Exemple #2
0
 public LightSample(Sample sample, LightSampleOffsets offsets, int n)
 {
     Debug.Assert(n < sample.Num2D[offsets.PosOffset]);
     Debug.Assert(n < sample.Num1D[offsets.ComponentOffset]);
     UPos0 = sample.TwoD[offsets.PosOffset][2 * n];
     UPos1 = sample.TwoD[offsets.PosOffset][2 * n + 1];
     UComponent = sample.OneD[offsets.ComponentOffset][n];
     Debug.Assert(UPos0 >= 0.0f && UPos0 < 1.0f);
     Debug.Assert(UPos1 >= 0.0f && UPos1 < 1.0f);
     Debug.Assert(UComponent >= 0.0f && UComponent < 1.0f);
 }