Beispiel #1
0
        public Color traceGlossy(ShadingState previous, Ray r, int i)
        {
            // limit path depth and disable caustic paths
            if (previous.getReflectionDepth() >= maxReflectionDepth || previous.getDiffuseDepth() > 0)
            {
                return(Color.BLACK);
            }
            IntersectionState istate = previous.getIntersectionState();

            scene.trace(r, istate);
            return(istate.hit() ? shadeHit(ShadingState.createGlossyBounceState(previous, r, i)) : Color.BLACK);
        }