Inferno
public java v1 · immutable Vec3 ld = light.location.minus(info.location); Vec3 n = info.normal; n.normalize(); ld.normalize(); Vec3 reflection = n.times(2.0f).times(ld.dot(n)).minus(ld); Vec3 richting = this.origin.minus(info.location); richting.normalize(); Vec3 color = light.color.times((float)Math.pow(Math.max(0, richting.dot(reflection)),1)); return color;