All pastes #236019 Raw Edit

Someone

public java v1 · immutable
·published 2006-11-03 16:04 UTC
rendered paste body
Sampler2D hm = info.object.material.heightmap;if(hm != null){	// get the gray value of a certain pixel from the heightmap	Vec3 sample = hm.sample(info.u, info.v);	// calculate a value between 0 and 1 from the given gray vector	        	float p = Perlin.perlin(sample, 1, 0);	// interpolate between the normal vector and the gray vector and set normal vector        	n = Perlin.bInterpolate(n, sample, p);        	n.normalize();}