Changed material algorithm from raytracing to path tracing.