All pastes #181063 Raw Edit

Inferno

public java v1 · immutable
#181063 ·published 2006-09-24 13:46 UTC
rendered paste body
 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;