private void GenerateSpheres()
    {
        Scene.Spheres.Clear();

        var sphereCount = Rand.Range(SphereCountMinMax);

        for (var i = 0; i < sphereCount; i++)
        {
            var sphere = new SceneSphere {
                MaterialIndex = (uint)Rand.Range(Scene.Materials.Count),
                Radius        = Rand.Range(SphereRadiusMinMax),
                Position      = Rand.InsideUnitCircleVec3 * SpherePositionRadius + Vector3.up * Rand.Float * SpherePositionHeight
            };
            Scene.Spheres.Add(sphere);
        }

        if (sphereComputeBuffer != null)
        {
            sphereComputeBuffer.Release();
        }
        MakeBuffer(ref sphereComputeBuffer, sphereCount, Scene.Spheres[0].Stride, Scene.Spheres.ToArray());
    }
예제 #2
0
 public IRadianceEvaluation Emit(ref SceneSphere aSceneSphere, float dirU, float dirV, float posU, float posV, out Point oPosition, out LightSample lightSample)
 {
     throw new NotImplementedException();
 }
예제 #3
0
 public IRadianceEvaluation Illuminate(ref SceneSphere aSceneSphere, ref Point position, float u, float v, out LightSample lightSample)
 {
     throw new NotImplementedException();
 }
예제 #4
0
 public abstract IRadianceEvaluation Emit(ref SceneSphere aSceneSphere, float dirU, float dirV, float posU,
     float posV, out Point oPosition, out LightSample lightSample);
예제 #5
0
 public abstract IRadianceEvaluation Illuminate(ref SceneSphere aSceneSphere, ref Point position, float u, float v,
     out LightSample lightSample);