From 1f4bb40b4407cee709a4bc7979795c4979f0b5bd Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Thu, 30 Apr 2020 01:32:18 +0200 Subject: [PATCH] Documentation intensifies --- .../shader-generators/HorizontalAdderGenerator.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ext/lib/ar-detect/gllib/shader-generators/HorizontalAdderGenerator.js b/src/ext/lib/ar-detect/gllib/shader-generators/HorizontalAdderGenerator.js index e34e6aa..2c33c84 100644 --- a/src/ext/lib/ar-detect/gllib/shader-generators/HorizontalAdderGenerator.js +++ b/src/ext/lib/ar-detect/gllib/shader-generators/HorizontalAdderGenerator.js @@ -3,6 +3,16 @@ * and calculates how much they deviate from the average. sum of pixels is stored in * the red pixel and diff is stored in the green one. Blue component holds the grayscale * average of the sample. Alpha component can be ignored. + * + * + * RGBA pixel data: + * + * | red | green | blue | + * +-------------------+-------------------+-------------------+ + * | sum of all pixels | stdev of all | avg of all pixels | + * | in a row | pixels | | + * | (grayscale) | (grayscale) | (grayscale) | + * * @param {number} sampleRadius sample width * @param {number} pixelSizeX size of a pixel on the texture (should be 1 / frameWidth) */