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()); }
public IRadianceEvaluation Emit(ref SceneSphere aSceneSphere, float dirU, float dirV, float posU, float posV, out Point oPosition, out LightSample lightSample) { throw new NotImplementedException(); }
public IRadianceEvaluation Illuminate(ref SceneSphere aSceneSphere, ref Point position, float u, float v, out LightSample lightSample) { throw new NotImplementedException(); }
public abstract IRadianceEvaluation Emit(ref SceneSphere aSceneSphere, float dirU, float dirV, float posU, float posV, out Point oPosition, out LightSample lightSample);
public abstract IRadianceEvaluation Illuminate(ref SceneSphere aSceneSphere, ref Point position, float u, float v, out LightSample lightSample);