mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
GaussianBlur: make short constructor call the longer one
PiperOrigin-RevId: 597212434
This commit is contained in:
parent
3596bc332d
commit
51d60e1f3a
2 changed files with 5 additions and 5 deletions
|
|
@ -15,7 +15,10 @@
|
||||||
|
|
||||||
precision highp float;
|
precision highp float;
|
||||||
varying vec2 vTexSamplingCoord;
|
varying vec2 vTexSamplingCoord;
|
||||||
|
// Center position of the function in the lookup texture.
|
||||||
|
uniform vec2 uFunctionLookupCenter;
|
||||||
uniform sampler2D uTexSampler;
|
uniform sampler2D uTexSampler;
|
||||||
|
uniform sampler2D uFunctionLookupSampler;
|
||||||
// 1D function LUT, only 2D due to OpenGL ES 2.0 limitations.
|
// 1D function LUT, only 2D due to OpenGL ES 2.0 limitations.
|
||||||
uniform int uIsHorizontal;
|
uniform int uIsHorizontal;
|
||||||
// Size of one texel in the source image, along the axis of interest.
|
// Size of one texel in the source image, along the axis of interest.
|
||||||
|
|
@ -32,9 +35,6 @@ uniform float uConvWidthTexels;
|
||||||
// Need to be able convert steps in source texels to steps in the function
|
// Need to be able convert steps in source texels to steps in the function
|
||||||
// lookup texture.
|
// lookup texture.
|
||||||
uniform float uFunctionLookupStepSize;
|
uniform float uFunctionLookupStepSize;
|
||||||
// Center position of the function in the lookup texture.
|
|
||||||
uniform vec2 uFunctionLookupCenter;
|
|
||||||
uniform sampler2D uFunctionLookupSampler;
|
|
||||||
|
|
||||||
// Reference Implementation:
|
// Reference Implementation:
|
||||||
void main() {
|
void main() {
|
||||||
|
|
|
||||||
|
|
@ -50,8 +50,8 @@ public final class GaussianBlur extends SeparableConvolution {
|
||||||
* @param sigma The half-width of 1 standard deviation, in pixels.
|
* @param sigma The half-width of 1 standard deviation, in pixels.
|
||||||
*/
|
*/
|
||||||
public GaussianBlur(float sigma) {
|
public GaussianBlur(float sigma) {
|
||||||
this.sigma = sigma;
|
this(sigma, /* numStandardDeviations= */ 2.0f);
|
||||||
this.numStandardDeviations = 2.0f;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue