Someone
public java v1 · immutableSampler2D 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();}