Пример #1
0
        //public Color Trace(Ray renderRay, int lightIndex, int depth)
        //{
        //    depth -= 1;
        //    //TODO: Rework sphere tracer.
        //    if (objectRender == null)
        //    {
        //        pixelColor = Color.Black;
        //        return pixelColor;
        //    }

        //    //if (depth > 0)
        //    //{
        //    //    Vector3 reflectDirection = ReflectRay(renderRay.Direction, hitNormal);
        //    //    renderRay.Set(hitPosition, reflectDirection);
        //    //    Trace(renderRay, lightIndex, depth);
        //    //}

        //    //objectRender = GetIntersectionObject(renderRay, out hitPosition, out hitNormal);
        //    //if (objectRender == null)
        //    //{
        //    //    pixelColor = Color.Black;
        //    //    return pixelColor;
        //    //}

        //    //pixelColor = objectRender.Color;
        //    SetObjectRenderUVProperties();
        //    ProcessUVTexture();
        //    pixelColor = ComputeLight(pixelColor, hitPosition, hitNormal, scene.GetPointLight(lightIndex));

        //    return pixelColor;
        //}

        private void SetSphereUVProperties(PotatoSphere sphere)
        {
            objectRenderTexturePath = sphere.GetTexturePath();
            objectRenderTexture     = textureManager.GetTexture(objectRenderTexturePath);
        }
Пример #2
0
 private void SetObjectRenderUVProperties()
 {
     objectRenderTexturePath = objectRender.GetTexturePath();
     objectRenderTexture     = textureManager.GetTexture(objectRenderTexturePath);
 }