03-28-2013, 07:29 AM
I believe it will make a quite substantial performance improvement.
Current noise has to do all these for each point queried:
1, Floor all coords to integral values
2, Calculate underlying noise value at 4x4x4 integral neighbors
3, Cubic-interpolate each layer (4x4x4 -> 4x4), then cubic-interpolate each column (4x4 -> 4), then finally cubic-interpolate the final value (4 -> 1)
With the new system, point 1 and 2 will be done only occasionally (rough expectation - about 5 % of all times) and I think even the interpolation could be tweaked somehow to save a few operations.
Current noise has to do all these for each point queried:
1, Floor all coords to integral values
2, Calculate underlying noise value at 4x4x4 integral neighbors
3, Cubic-interpolate each layer (4x4x4 -> 4x4), then cubic-interpolate each column (4x4 -> 4), then finally cubic-interpolate the final value (4 -> 1)
With the new system, point 1 and 2 will be done only occasionally (rough expectation - about 5 % of all times) and I think even the interpolation could be tweaked somehow to save a few operations.