text
stringlengths
9
39.2M
dir
stringlengths
26
295
lang
stringclasses
185 values
created_date
timestamp[us]
updated_date
timestamp[us]
repo_name
stringlengths
1
97
repo_full_name
stringlengths
7
106
star
int64
1k
183k
len_tokens
int64
1
13.8M
```glsl /* This equation is a simplification of the general blending equation. It assumes the destination color is opaque, and therefore drops the destination color's alpha term. D = C1 * C1a + C2 * C2a * (1 - C1a) where D is the resultant color, C1 is the color of the first element, C1a is the alpha of the first ...
/content/code_sandbox/framework/Source/Operations/Shaders/NormalBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
551
```glsl varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureCoordinate; varying vec2 bottomTextureCoordinate; varying vec2 bottomLeftTextureCoordinate; varying vec...
/content/code_sandbox/framework/Source/Operations/Shaders/ThresholdEdgeDetection_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
386
```glsl varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureCoordinate; varying vec2 bottomTextureCoordinate; varying vec2 bottomLeftTextureCoordinate; varying vec...
/content/code_sandbox/framework/Source/Operations/Shaders/PrewittEdgeDetection_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
331
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform highp float threshold; const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); void main() { highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); highp float luminance = dot(textureColor.rgb, W); h...
/content/code_sandbox/framework/Source/Operations/Shaders/LuminanceThreshold_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
121
```glsl varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureCoordinate; varying vec2 bottomTextureCoordinate; varying vec2 bottomLeftTextureCoordinate; varying vec...
/content/code_sandbox/framework/Source/Operations/Shaders/DirectionalSobelEdgeDetection_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
454
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { mediump vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); mediump vec4 textureColor2 = texture2D(inputImageTexture2, ...
/content/code_sandbox/framework/Source/Operations/Shaders/LinearBurnBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
126
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); float redCurveValue = texture2D(inputImageTexture2, vec2(textureColor.r, 0.0)).r; float greenCurveValue = tex...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramEqualizationRGB_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
152
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { lowp vec4 base = texture2D(inputImageTexture, textureCoordinate); lowp vec4 overlayer = texture2D(inputImageTexture2, textureCoordinate2...
/content/code_sandbox/framework/Source/Operations/Shaders/MultiplyBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
114
```glsl // Shader code based on Apple's CIChromaKeyFilter example: path_to_url#samplecode/CIChromaKeyFilter/Introduction/Intro.html precision highp float; varying highp vec2 textureCoordinate; uniform float thresholdSensitivity; uniform float smoothing; uniform vec3 colorToReplace; uniform sampler2D inputImageTextur...
/content/code_sandbox/framework/Source/Operations/Shaders/ChromaKey_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
337
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { mediump vec4 base = texture2D(inputImageTexture, textureCoordinate); mediump vec4 overlay = texture2D(inputImageTexture2, textureCoordin...
/content/code_sandbox/framework/Source/Operations/Shaders/SoftLightBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
175
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; uniform mediump mat3 colorConversionMatrix; void main() { mediump vec3 yuv; yuv.x = texture2D(inputImageTexture, textureCoordinate).r - (16.0/25...
/content/code_sandbox/framework/Source/Operations/Shaders/YUVConversionVideoRange_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
147
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform lowp float opacity; void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); gl_FragColor = vec4(textureColor.rgb, textureColor.a * opacity); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Opacity_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
66
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform highp vec2 center; uniform highp float radius; uniform highp float aspectRatio; uniform highp float refractiveIndex; // uniform vec3 lightPosition; const highp vec3 lightPosition = vec3(-0.5, 0.5, 1.0); const highp vec3 ambient...
/content/code_sandbox/framework/Source/Operations/Shaders/GlassSphere_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
468
```glsl // Sourced from Kyprianidis, J. E., Kang, H., and Doellner, J. "Anisotropic Kuwahara Filtering on the GPU," GPU Pro p.247 (2010). // // Original header: // // Anisotropic Kuwahara Filtering on the GPU // by Jan Eric Kyprianidis <www.kyprianidis.com> varying vec2 textureCoordinate; uniform sampler2D inputImag...
/content/code_sandbox/framework/Source/Operations/Shaders/KuwaharaRadius3_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
2,801
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; void main() { gl_FragColor = texture2D(inputImageTexture, textureCoordinate).bgra; } ```
/content/code_sandbox/framework/Source/Operations/Shaders/ColorSwizzling_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
40
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float hueAdjust; const vec4 kRGBToYPrime = vec4 (0.299, 0.587, 0.114, 0.0); const vec4 kRGBToI = vec4 (0.595716, -0.274453, -0.321263, 0.0); const vec4 kRGBToQ = vec4 (0.211456, -0.522591, 0.31135, 0.0); const vec4 kYIQTo...
/content/code_sandbox/framework/Source/Operations/Shaders/Hue_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
491
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float redAdjustment; uniform float greenAdjustment; uniform float blueAdjustment; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); gl_FragColor = vec4(textureColor.r * redAdjustment, tex...
/content/code_sandbox/framework/Source/Operations/Shaders/RGBAdjustment_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
92
```glsl varying vec2 centerTextureCoordinate; varying vec2 oneStepPositiveTextureCoordinate; varying vec2 oneStepNegativeTextureCoordinate; varying vec2 twoStepsPositiveTextureCoordinate; varying vec2 twoStepsNegativeTextureCoordinate; varying vec2 threeStepsPositiveTextureCoordinate; varying vec2 threeStepsNegativeTex...
/content/code_sandbox/framework/Source/Operations/Shaders/Erosion4_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
390
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { vec4 base = texture2D(inputImageTexture, textureCoordinate); vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); float r; if...
/content/code_sandbox/framework/Source/Operations/Shaders/AddBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
326
```glsl const lowp float scalingFactor = 1.0 / 256.0; varying lowp vec3 colorFactor; void main() { gl_FragColor = vec4(colorFactor * scalingFactor , 1.0); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramAccumulation_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
51
```glsl precision highp float; varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureCoordinate; varying vec2 bottomTextureCoordinate; varying vec2 bottomLeftTextur...
/content/code_sandbox/framework/Source/Operations/Shaders/ThresholdSketch_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
374
```glsl varying vec2 centerTextureCoordinate; varying vec2 oneStepPositiveTextureCoordinate; varying vec2 oneStepNegativeTextureCoordinate; varying vec2 twoStepsPositiveTextureCoordinate; varying vec2 twoStepsNegativeTextureCoordinate; uniform sampler2D inputImageTexture; void main() { vec4 centerIntensity = text...
/content/code_sandbox/framework/Source/Operations/Shaders/Dilation2_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
230
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform lowp float sensitivity; const mediump float harrisConstant = 0.04; void main() { mediump vec3 derivativeElements = texture2D(inputImageTexture, textureCoordinate).rgb; mediump float derivativeSum = derivativeEleme...
/content/code_sandbox/framework/Source/Operations/Shaders/HarrisCornerDetector_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
192
```glsl uniform sampler2D inputImageTexture; const lowp int GAUSSIAN_SAMPLES = 9; varying highp vec2 textureCoordinate; varying highp vec2 blurCoordinates[GAUSSIAN_SAMPLES]; uniform mediump float distanceNormalizationFactor; void main() { lowp vec4 centralColor; lowp float gaussianWeightTotal; lowp vec4...
/content/code_sandbox/framework/Source/Operations/Shaders/BilateralBlur_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
774
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); lowp float redCurveValue = texture2D(inputImageTexture2, vec2(textureColor.r, 0.0)).r; gl_Fra...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramEqualizationRed_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
104
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { lowp vec4 base = texture2D(inputImageTexture, textureCoordinate); lowp vec4 overlay = texture2D(inputImageTexture2, textureCoordinate2); ...
/content/code_sandbox/framework/Source/Operations/Shaders/AddBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
339
```glsl attribute vec4 position; attribute vec2 inputTextureCoordinate; uniform float texelWidth; uniform float texelHeight; varying vec2 centerTextureCoordinate; varying vec2 oneStepPositiveTextureCoordinate; varying vec2 oneStepNegativeTextureCoordinate; varying vec2 twoStepsPositiveTextureCoordinate; varying vec2 ...
/content/code_sandbox/framework/Source/Operations/Shaders/ErosionDilation3.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
232
```glsl varying vec2 centerTextureCoordinate; varying vec2 oneStepPositiveTextureCoordinate; varying vec2 oneStepNegativeTextureCoordinate; varying vec2 twoStepsPositiveTextureCoordinate; varying vec2 twoStepsNegativeTextureCoordinate; varying vec2 threeStepsPositiveTextureCoordinate; varying vec2 threeStepsNegativeTex...
/content/code_sandbox/framework/Source/Operations/Shaders/Dilation3_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
304
```glsl uniform sampler2D inputImageTexture; varying vec2 outputTextureCoordinate; varying vec2 upperLeftInputTextureCoordinate; varying vec2 upperRightInputTextureCoordinate; varying vec2 lowerLeftInputTextureCoordinate; varying vec2 lowerRightInputTextureCoordinate; void main() { float upperLeftLuminance = tex...
/content/code_sandbox/framework/Source/Operations/Shaders/AverageLuminance_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
213
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); ...
/content/code_sandbox/framework/Source/Operations/Shaders/LightenBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
88
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float opacity; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); gl_FragColor = vec4(textureColor.rgb, textureColor.a * opacity); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Opacity_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
60
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform vec2 center; void main() { vec2 normCoord = 2.0 * textureCoordinate - 1.0; vec2 normCenter = 2.0 * center - 1.0; normCoord -= normCenter; vec2 s = sign(normCoord); normCoord = abs(normCoord); normCoord =...
/content/code_sandbox/framework/Source/Operations/Shaders/StretchDistortion_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
182
```glsl precision highp float; uniform sampler2D inputImageTexture; varying highp vec2 outputTextureCoordinate; varying highp vec2 upperLeftInputTextureCoordinate; varying highp vec2 upperRightInputTextureCoordinate; varying highp vec2 lowerLeftInputTextureCoordinate; varying highp vec2 lowerRightInputTextureCoordin...
/content/code_sandbox/framework/Source/Operations/Shaders/AverageColor_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
194
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { float blurredInput = texture2D(inputImageTexture, textureCoordinate).r; float localLuminance = texture2D(inputImageTexture2, textureCoordinate2).r; ...
/content/code_sandbox/framework/Source/Operations/Shaders/AdaptiveThreshold_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
116
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); vec...
/content/code_sandbox/framework/Source/Operations/Shaders/ScreenBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
109
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float shadowTintIntensity; uniform float highlightTintIntensity; uniform vec3 shadowTintColor; uniform vec3 highlightTintColor; const vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); void main() { vec4 textureColor = textu...
/content/code_sandbox/framework/Source/Operations/Shaders/HighlightShadowTint_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
212
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { mediump vec4 base = texture2D(inputImageTexture, textureCoordinate); mediump vec4 overlay = texture2D(inputImageTexture2, textureCoordin...
/content/code_sandbox/framework/Source/Operations/Shaders/ExclusionBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
179
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform highp float aspectRatio; uniform highp vec2 center; uniform highp float radius; uniform highp float scale; void main() { highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, ((textureCoordinate.y - center.y) * aspe...
/content/code_sandbox/framework/Source/Operations/Shaders/BulgeDistortion_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
195
```glsl uniform sampler2D inputImageTexture; varying highp vec2 textureCoordinate; uniform lowp vec2 vignetteCenter; uniform lowp vec3 vignetteColor; uniform highp float vignetteStart; uniform highp float vignetteEnd; void main() { lowp vec4 sourceImageColor = texture2D(inputImageTexture, textureCoordinate); ...
/content/code_sandbox/framework/Source/Operations/Shaders/Vignette_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
144
```glsl varying vec2 textureCoordinate; varying float height; uniform sampler2D inputImageTexture; vec4 backgroundColor = vec4(0.0, 0.0, 0.0, 0.0); void main() { vec3 colorChannels = texture2D(inputImageTexture, textureCoordinate).rgb; vec4 heightTest = vec4(step(height, colorChannels), 1.0); gl_FragColor...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramDisplay_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
114
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { mediump vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); mediump vec4 textureColor2 = texture2D(inputImageTexture2, te...
/content/code_sandbox/framework/Source/Operations/Shaders/ColorBurnBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
115
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; void main() { vec4 color = texture2D(inputImageTexture, textureCoordinate); if (color.a < 0.5) { discard; } else { gl_FragColor = color; } } ```
/content/code_sandbox/framework/Source/Operations/Shaders/AlphaTest_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
71
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform lowp float vibrance; void main() { lowp vec4 color = texture2D(inputImageTexture, textureCoordinate); lowp float average = (color.r + color.g + color.b) / 3.0; lowp float mx = max(color.r, max(color.g, color.b)); ...
/content/code_sandbox/framework/Source/Operations/Shaders/Vibrance_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
130
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; const lowp vec3 W = vec3(0.2125, 0.7154, 0.0721); void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); lowp float luminance = dot(textureColor.rgb, W); ...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramEqualizationLuminance_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
237
```glsl precision highp float; varying highp vec2 textureCoordinate; varying highp vec2 leftTextureCoordinate; varying highp vec2 rightTextureCoordinate; varying highp vec2 topTextureCoordinate; varying highp vec2 bottomTextureCoordinate; varying highp float centerMultiplier; varying highp float edgeMultiplier; uni...
/content/code_sandbox/framework/Source/Operations/Shaders/Sharpen_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
250
```glsl uniform sampler2D inputImageTexture; varying highp vec2 textureCoordinate; uniform lowp float shadows; uniform lowp float highlights; const mediump vec3 luminanceWeighting = vec3(0.3, 0.3, 0.3); void main() { lowp vec4 source = texture2D(inputImageTexture, textureCoordinate); mediump float luminance...
/content/code_sandbox/framework/Source/Operations/Shaders/HighlightShadow_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
316
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { mediump vec4 base = texture2D(inputImageTexture, textureCoordinate); mediump vec4 overlay = texture2D(inputImageTexture2, textureCoordin...
/content/code_sandbox/framework/Source/Operations/Shaders/OverlayBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
449
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; void main() { gl_FragColor = texture2D(inputImageTexture, textureCoordinate).bgra; } ```
/content/code_sandbox/framework/Source/Operations/Shaders/ColorSwizzling_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
42
```glsl precision highp float; uniform sampler2D inputImageTexture; uniform mediump mat3 convolutionMatrix; varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureC...
/content/code_sandbox/framework/Source/Operations/Shaders/Convolution3x3_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
424
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); lowp vec4 textureColor2 = texture2D(inputImageTexture2, textureCoo...
/content/code_sandbox/framework/Source/Operations/Shaders/SourceOverBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
100
```glsl precision lowp float; varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureCoordinate; varying vec2 bottomTextureCoordinate; varying vec2 bottomLeftTexture...
/content/code_sandbox/framework/Source/Operations/Shaders/WeakPixelInclusion_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
348
```glsl uniform sampler2D inputImageTexture; varying highp vec2 textureCoordinate; uniform lowp float temperature; uniform lowp float tint; const lowp vec3 warmFilter = vec3(0.93, 0.54, 0.0); const mediump mat3 RGBtoYIQ = mat3(0.299, 0.587, 0.114, 0.596, -0.274, -0.322, 0.212, -0.523, 0.311); const mediump mat3 YIQ...
/content/code_sandbox/framework/Source/Operations/Shaders/WhiteBalance_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
450
```glsl uniform sampler2D inputImageTexture; varying vec2 textureCoordinate; uniform float temperature; uniform float tint; const vec3 warmFilter = vec3(0.93, 0.54, 0.0); const mat3 RGBtoYIQ = mat3(0.299, 0.587, 0.114, 0.596, -0.274, -0.322, 0.212, -0.523, 0.311); const mat3 YIQtoRGB = mat3(1.0, 0.956, 0.621, 1.0, -...
/content/code_sandbox/framework/Source/Operations/Shaders/WhiteBalance_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
429
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); lowp vec4 textureColor2 = texture2D(inputImageTexture2, textureCoord...
/content/code_sandbox/framework/Source/Operations/Shaders/SubtractBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
100
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform highp vec2 center; uniform highp float radius; uniform highp float aspectRatio; uniform highp float refractiveIndex; void main() { highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspect...
/content/code_sandbox/framework/Source/Operations/Shaders/SphereRefraction_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
254
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform highp float exposure; void main() { highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); gl_FragColor = vec4(textureColor.rgb * pow(2.0, exposure), textureColor.w); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Exposure_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
72
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform vec2 center; uniform vec2 pixelSize; void main() { vec2 normCoord = 2.0 * textureCoordinate - 1.0; vec2 normCenter = 2.0 * center - 1.0; normCoord -= normCenter; float r = length(normCoord); // to polar co...
/content/code_sandbox/framework/Source/Operations/Shaders/PolarPixellate_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
210
```glsl attribute vec4 position; attribute vec4 inputTextureCoordinate; uniform float texelWidth; uniform float texelHeight; uniform float sharpness; varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 bottomTextur...
/content/code_sandbox/framework/Source/Operations/Shaders/Sharpen.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
218
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; void main() { gl_FragColor = texture2D(inputImageTexture, textureCoordinate); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Passthrough_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
39
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); lowp float redCurveValue = texture2D(inputImageTexture2, vec2(textureColor.r, 0.0)).r; lowp float...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramEqualizationRGB_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
163
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); float blueCurveValue = texture2D(inputImageTexture2, vec2(textureColor.b, 0.0)).b; gl_FragColor = vec4(t...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramEqualizationBlue_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
98
```glsl uniform vec3 lineColor; void main() { gl_FragColor = vec4(lineColor, 1.0); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Line_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
28
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); lowp float blueCurveValue = texture2D(inputImageTexture2, vec2(textureColor.b, 0.0)).b; gl_Fr...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramEqualizationBlue_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
104
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform lowp float saturation; // Values from "Graphics Shaders: Theory and Practice" by Bailey and Cunningham const mediump vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); void main() { lowp vec4 textureColor = texture2...
/content/code_sandbox/framework/Source/Operations/Shaders/Saturation_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
153
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float gamma; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); gl_FragColor = vec4(pow(textureColor.rgb, vec3(gamma)), textureColor.w); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Gamma_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
64
```glsl #version 120 uniform vec3 crosshairColor; varying vec2 centerLocation; varying float pointSpacing; void main() { vec2 distanceFromCenter = abs(centerLocation - gl_PointCoord.xy); float axisTest = step(pointSpacing, gl_PointCoord.y) * step(distanceFromCenter.x, 0.09) + step(pointSpacing, gl_PointCoord...
/content/code_sandbox/framework/Source/Operations/Shaders/Crosshair_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
147
```glsl // Saturation blend mode based upon pseudo code from the PDF specification. varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; highp float lum(lowp vec3 c) { return dot(c, vec3(0.3, 0.59, 0.11)); } lowp ...
/content/code_sandbox/framework/Source/Operations/Shaders/SaturationBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
927
```shell #!/usr/bin/swift // This converts shader files into Swift inlined strings for embedding in the library import Foundation enum OpenGLPlatform { case OpenGL case OpenGLES case Both } let fileNames = CommandLine.arguments.dropFirst() var allConvertedGLShaders = "" var allConvertedGLESShaders = "" ...
/content/code_sandbox/framework/Source/Operations/Shaders/ShaderConverter.sh
shell
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
569
```glsl varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureCoordinate; varying vec2 bottomTextureCoordinate; varying vec2 bottomLeftTextureCoordinate; varying vec...
/content/code_sandbox/framework/Source/Operations/Shaders/WeakPixelInclusion_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
343
```glsl attribute vec4 position; varying vec3 colorFactor; void main() { colorFactor = vec3(0.0, 0.0, 1.0); gl_Position = vec4(-1.0 + (position.z * 0.0078125), 0.0, 0.0, 1.0); gl_PointSize = 1.0; } ```
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramBlueSampling.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
86
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { mediump vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); mediump vec4 textureColor2 = texture2D(inputImageTexture2, ...
/content/code_sandbox/framework/Source/Operations/Shaders/ScreenBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
119
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform lowp float sensitivity; void main() { mediump vec3 derivativeElements = texture2D(inputImageTexture, textureCoordinate).rgb; mediump float derivativeDifference = derivativeElements.x - derivativeElements.y; med...
/content/code_sandbox/framework/Source/Operations/Shaders/ShiTomasiFeatureDetector_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
183
```glsl attribute vec4 position; attribute vec4 inputTextureCoordinate; attribute vec4 inputTextureCoordinate2; attribute vec4 inputTextureCoordinate3; attribute vec4 inputTextureCoordinate4; varying vec2 textureCoordinate; varying vec2 textureCoordinate2; varying vec2 textureCoordinate3; varying vec2 textureCoordinat...
/content/code_sandbox/framework/Source/Operations/Shaders/FourInput.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
121
```glsl /* This equation is a simplification of the general blending equation. It assumes the destination color is opaque, and therefore drops the destination color's alpha term. D = C1 * C1a + C2 * C2a * (1 - C1a) where D is the resultant color, C1 is the color of the first element, C1a is the alpha of the first ...
/content/code_sandbox/framework/Source/Operations/Shaders/NormalBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
552
```glsl attribute vec4 position; attribute vec4 inputTextureCoordinate; varying vec2 textureCoordinate; void main() { gl_Position = position; textureCoordinate = inputTextureCoordinate.xy; } ```
/content/code_sandbox/framework/Source/Operations/Shaders/OneInput.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
40
```glsl varying vec2 centerTextureCoordinate; varying vec2 oneStepPositiveTextureCoordinate; varying vec2 oneStepNegativeTextureCoordinate; varying vec2 twoStepsPositiveTextureCoordinate; varying vec2 twoStepsNegativeTextureCoordinate; varying vec2 threeStepsPositiveTextureCoordinate; varying vec2 threeStepsNegativeTex...
/content/code_sandbox/framework/Source/Operations/Shaders/Dilation4_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
390
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float threshold; const vec3 W = vec3(0.2125, 0.7154, 0.0721); void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); float luminance = dot(textureColor.rgb, W); float thresholdResult = step(lu...
/content/code_sandbox/framework/Source/Operations/Shaders/Solarize_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
122
```glsl attribute vec4 position; attribute vec4 inputTextureCoordinate; varying vec2 textureCoordinate; varying float height; void main() { gl_Position = position; textureCoordinate = vec2(inputTextureCoordinate.x, 0.5); height = 1.0 - inputTextureCoordinate.y; } ```
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramDisplay.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
65
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2); gl_...
/content/code_sandbox/framework/Source/Operations/Shaders/DifferenceBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
95
```glsl precision highp float; varying vec2 textureCoordinate; varying vec2 pointATextureCoordinate; varying vec2 pointBTextureCoordinate; varying vec2 pointCTextureCoordinate; varying vec2 pointDTextureCoordinate; varying vec2 pointETextureCoordinate; varying vec2 pointFTextureCoordinate; varying vec2 pointGTextureCo...
/content/code_sandbox/framework/Source/Operations/Shaders/ColourFASTDecriptor_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
689
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform lowp float gamma; void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); gl_FragColor = vec4(pow(textureColor.rgb, vec3(gamma)), textureColor.w); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Gamma_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
70
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; // lookup texture uniform float intensity; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); float blueColor = textureColor...
/content/code_sandbox/framework/Source/Operations/Shaders/Lookup_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
446
```glsl // Luminosity blend mode based upon pseudo code from the PDF specification. varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; float lum(vec3 c) { return dot(c, vec3(0.3, 0.59, 0.11)); } vec3 clipcolor(vec3 c) { ...
/content/code_sandbox/framework/Source/Operations/Shaders/LuminosityBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
416
```glsl precision mediump float; varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureCoordinate; varying vec2 bottomTextureCoordinate; varying vec2 bottomLeftText...
/content/code_sandbox/framework/Source/Operations/Shaders/DirectionalSobelEdgeDetection_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
459
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform highp float threshold; const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); void main() { highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); highp float luminance = dot(textureColor.rgb, W); h...
/content/code_sandbox/framework/Source/Operations/Shaders/Solarize_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
135
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform highp float aspectRatio; uniform highp vec2 center; uniform highp float radius; uniform highp float scale; void main() { highp vec2 textureCoordinateToUse = vec2(textureCoordinate.x, (textureCoordinate.y * aspectRatio + 0....
/content/code_sandbox/framework/Source/Operations/Shaders/PinchDistortion_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
219
```glsl // Shader code based on Apple's CIChromaKeyFilter example: path_to_url#samplecode/CIChromaKeyFilter/Introduction/Intro.html varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform float thresholdSensitivity; uniform float smoothing; uniform vec3 colorToReplace; uniform sampler2D inputImageTex...
/content/code_sandbox/framework/Source/Operations/Shaders/ChromaKeyBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
369
```glsl precision lowp float; varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float intensity; uniform vec3 firstColor; uniform vec3 secondColor; const mediump vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); void main() { lowp vec4 textureColor = texture2D(inputImageTe...
/content/code_sandbox/framework/Source/Operations/Shaders/FalseColor_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
133
```glsl // Color blend mode based upon pseudo code from the PDF specification. varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; float lum(vec3 c) { return dot(c, vec3(0.3, 0.59, 0.11)); } vec3 clipcolor(vec3 c) { floa...
/content/code_sandbox/framework/Source/Operations/Shaders/ColorBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
414
```glsl varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureCoordinate; varying vec2 bottomTextureCoordinate; varying vec2 bottomLeftTextureCoordinate; varying vec...
/content/code_sandbox/framework/Source/Operations/Shaders/Toon_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
448
```glsl attribute vec4 position; attribute vec4 inputTextureCoordinate; uniform vec2 directionalTexelStep; varying vec2 textureCoordinate; varying vec2 oneStepBackTextureCoordinate; varying vec2 twoStepsBackTextureCoordinate; varying vec2 threeStepsBackTextureCoordinate; varying vec2 fourStepsBackTextureCoordinate; v...
/content/code_sandbox/framework/Source/Operations/Shaders/MotionBlur.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
295
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { highp float blurredInput = texture2D(inputImageTexture, textureCoordinate).r; highp float localLuminance = texture2D(inputImageTexture2...
/content/code_sandbox/framework/Source/Operations/Shaders/AdaptiveThreshold_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
127
```glsl precision highp float; varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureCoordinate; varying vec2 bottomTextureCoordinate; varying vec2 bottomLeftTextur...
/content/code_sandbox/framework/Source/Operations/Shaders/PrewittEdgeDetection_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
336
```glsl uniform sampler2D inputImageTexture; varying vec2 textureCoordinate; uniform vec2 vignetteCenter; uniform vec3 vignetteColor; uniform float vignetteStart; uniform float vignetteEnd; void main() { vec4 sourceImageColor = texture2D(inputImageTexture, textureCoordinate); float d = distance(textureCoordin...
/content/code_sandbox/framework/Source/Operations/Shaders/Vignette_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
128
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; void main() { vec2 sampleDivisor = vec2(1.0 / 200.0, 1.0 / 320.0); //highp vec4 colorDivisor = vec4(colorDepth); vec2 samplePos = textureCoordinate - mod(textureCoordinate, sampleDivisor); vec4 color = texture2D(inputIma...
/content/code_sandbox/framework/Source/Operations/Shaders/CGAColorspace_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
418
```glsl // Shader code based on Apple's CIChromaKeyFilter example: path_to_url#samplecode/CIChromaKeyFilter/Introduction/Intro.html varying vec2 textureCoordinate; uniform float thresholdSensitivity; uniform float smoothing; uniform vec3 colorToReplace; uniform sampler2D inputImageTexture; void main() { vec4 tex...
/content/code_sandbox/framework/Source/Operations/Shaders/ChromaKey_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
330
```glsl uniform sampler2D inputImageTexture; varying vec2 outputTextureCoordinate; varying vec2 upperLeftInputTextureCoordinate; varying vec2 upperRightInputTextureCoordinate; varying vec2 lowerLeftInputTextureCoordinate; varying vec2 lowerRightInputTextureCoordinate; void main() { vec4 upperLeftColor = texture2...
/content/code_sandbox/framework/Source/Operations/Shaders/AverageColor_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
171
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; uniform lowp float mixturePercent; void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); lowp vec4 textureColor2 = textur...
/content/code_sandbox/framework/Source/Operations/Shaders/AlphaBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
117
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float crossHatchSpacing; uniform float lineWidth; const vec3 W = vec3(0.2125, 0.7154, 0.0721); void main() { float luminance = dot(texture2D(inputImageTexture, textureCoordinate).rgb, W); vec4 colorToDisplay = vec4(1.0...
/content/code_sandbox/framework/Source/Operations/Shaders/Crosshatch_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
408
```glsl varying highp vec2 textureCoordinate; varying highp float height; uniform sampler2D inputImageTexture; lowp vec4 backgroundColor = vec4(0.0, 0.0, 0.0, 0.0); void main() { lowp vec3 colorChannels = texture2D(inputImageTexture, textureCoordinate).rgb; lowp vec4 heightTest = vec4(step(height, colorChanne...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramDisplay_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
124