INNER CODE UNIT · C#

mask

Blotch3D/Blotch3D · src/BlGeometry.cs:55

			int mask = (int)(Math.Pow(2, numSignificantBits) + .5) - 1;

			if (Double.IsNaN(noiseLevel))
				noiseLevel = .7 / mask;

			var len = width * height;
			var pixels = new int[len];
			tex.GetData(pixels);

			return CreatePlanarSurface
			(
				(x,y)=>(double)(pixels[x + width * y] & mask) / (mask + 1),
				width,
				height,
				mirrorY,
				smooth,
				noiseLevel
			);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…