All pastes #181051 Raw Edit

Inferno

public java v1 · immutable
#181051 ·published 2006-09-24 13:26 UTC
rendered paste body
Vec3 ld = light.location.minus(info.location);Vec3 n = info.normal;n.normalize();ld.normalize();		Vec3 reflection = ld.times(n.times(2.0f).times(ld.dot(n))).times(-1.0f);Vec3 color = light.color.times((float)Math.pow(Math.max(0, this.origin.dot(reflection)),1));		return color;