code at GenerateHistogramTextureOnGPU
computeHistogram.SetFloat("ValueRange", (float)(numValues - 1));
should be
computeHistogram.SetFloat("ValueRange", (float)(sampleCount - 1));
With this fix, the histogram can be displayed correctly even for data with a large data range.