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
```swift public class Erosion: TwoStageOperation { public var radius:UInt { didSet { switch radius { case 0, 1: shader = crashOnShaderCompileFailure("Erosion"){try sharedImageProcessingContext.programForVertexShader(ErosionDilation1VertexShader, fragmentShader...
/content/code_sandbox/framework/Source/Operations/Erosion.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
327
```swift #if canImport(OpenGL) import OpenGL.GL #endif #if canImport(OpenGLES) import OpenGLES #endif #if canImport(COpenGLES) import COpenGLES.gles2 #endif #if canImport(COpenGL) import COpenGL #endif public class CircleGenerator: ImageGenerator { let circleShader:ShaderProgram public override init(s...
/content/code_sandbox/framework/Source/Operations/CircleGenerator.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
516
```swift public class PolkaDot: BasicOperation { public var dotScaling:Float = 0.90 { didSet { uniformSettings["dotScaling"] = dotScaling } } public var fractionalWidthOfAPixel:Float = 0.01 { didSet { let imageWidth = 1.0 / Float(self.renderFramebuffer?.size.width ?? 2048) unifor...
/content/code_sandbox/framework/Source/Operations/PolkaDot.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
157
```swift public class SaturationBlend: BasicOperation { public init() { super.init(fragmentShader:SaturationBlendFragmentShader, numberOfInputs:2) } } ```
/content/code_sandbox/framework/Source/Operations/SaturationBlend.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
35
```swift public class SphereRefraction: BasicOperation { public var radius:Float = 0.25 { didSet { uniformSettings["radius"] = radius } } public var refractiveIndex:Float = 0.71 { didSet { uniformSettings["refractiveIndex"] = refractiveIndex } } public var center:Position = Position.center { didSet { unifor...
/content/code_sandbox/framework/Source/Operations/SphereRefraction.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
172
```swift public class Laplacian: TextureSamplingOperation { public init() { super.init(fragmentShader:LaplacianFragmentShader) } } ```
/content/code_sandbox/framework/Source/Operations/Laplacian.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
31
```swift public class ChromaKeyBlend: BasicOperation { public var thresholdSensitivity:Float = 0.4 { didSet { uniformSettings["thresholdSensitivity"] = thresholdSensitivity } } public var smoothing:Float = 0.1 { didSet { uniformSettings["smoothing"] = smoothing } } public var colorToReplace:Color = Color.gr...
/content/code_sandbox/framework/Source/Operations/ChromaKeyBlend.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
152
```swift public class ContrastAdjustment: BasicOperation { public var contrast:Float = 1.0 { didSet { uniformSettings["contrast"] = contrast } } public init() { super.init(fragmentShader:ContrastFragmentShader, numberOfInputs:1) ({contrast = 1.0})() } } ```
/content/code_sandbox/framework/Source/Operations/ContrastAdjustment.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
69
```swift public class EmbossFilter : Convolution3x3 { public var intensity:Float = 1.0 { didSet { self.convolutionKernel = Matrix3x3(rowMajorValues:[ intensity * (-2.0), -intensity, 0.0, -intensity, 1.0, intensity, 0.0, intensity, intensity * 2.0])...
/content/code_sandbox/framework/Source/Operations/EmbossFilter.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
116
```swift public class StretchDistortion: BasicOperation { public var center:Position = Position.center { didSet { uniformSettings["center"] = center } } public init() { super.init(fragmentShader:StretchDistortionFragmentShader, numberOfInputs:1) ({center = Position.center})() }...
/content/code_sandbox/framework/Source/Operations/StretchDistortion.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
66
```swift public class iOSBlur: OperationGroup { public var blurRadiusInPixels:Float = 48.0 { didSet { gaussianBlur.blurRadiusInPixels = blurRadiusInPixels } } public var saturation:Float = 0.8 { didSet { saturationFilter.saturation = saturation } } public var rangeReductionFactor:Float = 0.6 { didSet { lumi...
/content/code_sandbox/framework/Source/Operations/iOSBlur.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
210
```swift // PictureInput isn't defined yet on Linux, so this operation is inoperable there #if !os(Linux) public class LookupFilter: BasicOperation { public var intensity:Float = 1.0 { didSet { uniformSettings["intensity"] = intensity } } public var lookupImage:PictureInput? { // TODO: Check for retain cycles ...
/content/code_sandbox/framework/Source/Operations/LookupFilter.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
147
```swift public class LanczosResampling: BasicOperation { public init() { super.init(vertexShader:LanczosResamplingVertexShader, fragmentShader:LanczosResamplingFragmentShader) } override func internalRenderFunction(_ inputFramebuffer:Framebuffer, textureProperties:[InputTextureProperties]) { ...
/content/code_sandbox/framework/Source/Operations/LanczosResampling.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
375
```swift public class SoftLightBlend: BasicOperation { public init() { super.init(fragmentShader:SoftLightBlendFragmentShader, numberOfInputs:2) } } ```
/content/code_sandbox/framework/Source/Operations/SoftLightBlend.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
35
```swift public class LowPassFilter: OperationGroup { public var strength: Float = 0.5 { didSet { dissolveBlend.mix = strength } } let dissolveBlend = DissolveBlend() let buffer = ImageBuffer() public override init() { super.init() buffer.bufferSize = 1 ({stren...
/content/code_sandbox/framework/Source/Operations/LowPassFilter.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
159
```swift public class UnsharpMask: OperationGroup { public var blurRadiusInPixels: Float { didSet { gaussianBlur.blurRadiusInPixels = blurRadiusInPixels } } public var intensity: Float = 1.0 { didSet { unsharpMask.uniformSettings["intensity"] = intensity } } let gaussianBlur = GaussianBlur() let un...
/content/code_sandbox/framework/Source/Operations/UnsharpMask.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
163
```swift public class LightenBlend: BasicOperation { public init() { super.init(fragmentShader:LightenBlendFragmentShader, numberOfInputs:2) } } ```
/content/code_sandbox/framework/Source/Operations/LightenBlend.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
35
```swift public class DarkenBlend: BasicOperation { public init() { super.init(fragmentShader:DarkenBlendFragmentShader, numberOfInputs:2) } } ```
/content/code_sandbox/framework/Source/Operations/DarkenBlend.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
35
```swift /** A photo filter based on Photoshop action by Miss Etikate: path_to_url */ // Note: If you want to use this effect you have to add lookup_miss_etikate.png // from Resources folder to your application bundle. #if !os(Linux) public class MissEtikateFilter: LookupFilter { public override init() { ...
/content/code_sandbox/framework/Source/Operations/MissEtikateFilter.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
103
```swift public class DivideBlend: BasicOperation { public init() { super.init(fragmentShader:DivideBlendFragmentShader, numberOfInputs:2) } } ```
/content/code_sandbox/framework/Source/Operations/DivideBlend.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
34
```swift public class GammaAdjustment: BasicOperation { public var gamma:Float = 1.0 { didSet { uniformSettings["gamma"] = gamma } } public init() { super.init(fragmentShader:GammaFragmentShader, numberOfInputs:1) ({gamma = 1.0})() } } ```
/content/code_sandbox/framework/Source/Operations/GammaAdjustment.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
68
```swift public class OverlayBlend: BasicOperation { public init() { super.init(fragmentShader:OverlayBlendFragmentShader, numberOfInputs:2) } } ```
/content/code_sandbox/framework/Source/Operations/OverlayBlend.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
33
```swift public class HighPassFilter: OperationGroup { public var strength: Float = 0.5 { didSet { lowPass.strength = strength } } let lowPass = LowPassFilter() let differenceBlend = DifferenceBlend() public override init() { super.init() ({strength = 0.5})() ...
/content/code_sandbox/framework/Source/Operations/HighPassFilter.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
110
```swift public class Luminance: BasicOperation { public init() { super.init(fragmentShader:LuminanceFragmentShader, numberOfInputs:1) } } ```
/content/code_sandbox/framework/Source/Operations/Luminance.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
34
```swift /** This is based on "Accelerating image recognition on mobile devices using GPGPU" by Miguel Bordallo Lopez, Henri Nykanen, Jari Hannuksela, Olli Silven and Markku Vehvilainen path_to_url~jhannuks/publications/SPIE2011a.pdf Right pixel is the most significant bit, traveling clockwise to get to the upper r...
/content/code_sandbox/framework/Source/Operations/ColorLocalBinaryPattern.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
175
```swift public class OpeningFilter: OperationGroup { public var radius:UInt { didSet { erosion.radius = radius dilation.radius = radius } } let erosion = Erosion() let dilation = Dilation() public override init() { radius = 1 super.init()...
/content/code_sandbox/framework/Source/Operations/OpeningFilter.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
97
```swift public class ThresholdSketchFilter: TextureSamplingOperation { public var edgeStrength:Float = 1.0 { didSet { uniformSettings["edgeStrength"] = edgeStrength } } public var threshold:Float = 0.25 { didSet { uniformSettings["threshold"] = threshold } } public init() { super.init(fragment...
/content/code_sandbox/framework/Source/Operations/ThresholdSketch.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
102
```swift public class SolidColorGenerator: ImageGenerator { public func renderColor(_ color:Color) { imageFramebuffer.activateFramebufferForRendering() clearFramebufferWithColor(color) notifyTargets() } } ```
/content/code_sandbox/framework/Source/Operations/SolidColorGenerator.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
45
```swift #if canImport(OpenGL) || canImport(COpenGL) public let AdaptiveThresholdFragmentShader = "varying vec2 textureCoordinate;\n varying vec2 textureCoordinate2;\n \n uniform sampler2D inputImageTexture;\n uniform sampler2D inputImageTexture2;\n \n void main()\n {\n float blurredInput = texture2D(inputImageTe...
/content/code_sandbox/framework/Source/Operations/ConvertedShaders_GL.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
42,201
```swift public class PinchDistortion: BasicOperation { public var radius:Float = 1.0 { didSet { uniformSettings["radius"] = radius } } public var scale:Float = 0.5 { didSet { uniformSettings["scale"] = scale } } public var center:Position = Position.center { didSet { uniformSettings["center"] = center } } ...
/content/code_sandbox/framework/Source/Operations/PinchDistortion.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
134
```swift public class AverageLuminanceThreshold: OperationGroup { public var thresholdMultiplier:Float = 1.0 let averageLuminance = AverageLuminanceExtractor() let luminanceThreshold = LuminanceThreshold() public override init() { super.init() averageLuminance.extracte...
/content/code_sandbox/framework/Source/Operations/AverageLuminanceThreshold.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
143
```swift #if !os(Linux) public class SoftElegance: OperationGroup { let lookup1 = LookupFilter() let lookup2 = LookupFilter() let gaussianBlur = GaussianBlur() let alphaBlend = AlphaBlend() public override init() { super.init() self.configureGroup{input, output in ...
/content/code_sandbox/framework/Source/Operations/SoftElegance.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
177
```swift public class ColorMatrixFilter: BasicOperation { public var intensity:Float = 1.0 { didSet { uniformSettings["intensity"] = intensity } } public var colorMatrix:Matrix4x4 = Matrix4x4.identity { didSet { uniformSettings["colorMatrix"] = colorMatrix } } public init() { super.ini...
/content/code_sandbox/framework/Source/Operations/ColorMatrixFilter.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
114
```swift public class AdaptiveThreshold: OperationGroup { public var blurRadiusInPixels: Float { didSet { boxBlur.blurRadiusInPixels = blurRadiusInPixels } } let luminance = Luminance() let boxBlur = BoxBlur() let adaptiveThreshold = BasicOperation(fragmentShader:AdaptiveThresholdFragmentShader, nu...
/content/code_sandbox/framework/Source/Operations/AdaptiveThreshold.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
141
```swift public class SaturationAdjustment: BasicOperation { public var saturation:Float = 1.0 { didSet { uniformSettings["saturation"] = saturation } } public init() { super.init(fragmentShader:SaturationFragmentShader, numberOfInputs:1) ({saturation = 1.0})() } } ```
/content/code_sandbox/framework/Source/Operations/SaturationAdjustment.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
71
```swift public class Halftone: BasicOperation { public var fractionalWidthOfAPixel:Float = 0.01 { didSet { sharedImageProcessingContext.runOperationAsynchronously{ let imageWidth = 1.0 / Float(self.renderFramebuffer?.size.width ?? 2048) self.uniformSettings["frac...
/content/code_sandbox/framework/Source/Operations/Halftone.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
134
```swift // TODO: auto-generate shaders for this, per the Gaussian blur method public class BilateralBlur: TwoStageOperation { public var distanceNormalizationFactor:Float = 8.0 { didSet { uniformSettings["distanceNormalizationFactor"] = distanceNormalizationFactor } } public init() { super.init(v...
/content/code_sandbox/framework/Source/Operations/BilateralBlur.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
97
```swift public class MonochromeFilter: BasicOperation { public var intensity:Float = 1.0 { didSet { uniformSettings["intensity"] = intensity } } public var color:Color = Color(red:0.6, green:0.45, blue:0.3, alpha:1.0) { didSet { uniformSettings["filterColor"] = color } } public init() { super....
/content/code_sandbox/framework/Source/Operations/MonochromeFilter.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
146
```swift /** This generates image-wide feature descriptors using the ColourFAST process, as developed and described in A. Ensor and S. Hall. ColourFAST: GPU-based feature point detection and tracking on mobile devices. 28th International Conference of Image and Vision Computing, New Zealand, 2013, p. 124-129. Seth ...
/content/code_sandbox/framework/Source/Operations/ColourFASTFeatureDetection.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
262
```swift public class HueAdjustment: BasicOperation { public var hue:Float = 90.0 { didSet { uniformSettings["hueAdjust"] = hue } } public init() { super.init(fragmentShader:HueFragmentShader, numberOfInputs:1) ({hue = 90.0})() } } ```
/content/code_sandbox/framework/Source/Operations/HueAdjustment.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
69
```swift public class ZoomBlur: BasicOperation { public var blurSize:Float = 1.0 { didSet { uniformSettings["blurSize"] = blurSize } } public var blurCenter:Position = Position.center { didSet { uniformSettings["blurCenter"] = blurCenter } } public init() { super.init(fragmentShader:ZoomBlurFra...
/content/code_sandbox/framework/Source/Operations/ZoomBlur.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
105
```swift public class ClosingFilter: OperationGroup { public var radius:UInt { didSet { erosion.radius = radius dilation.radius = radius } } let erosion = Erosion() let dilation = Dilation() public override init() { radius = 1 super.init()...
/content/code_sandbox/framework/Source/Operations/ClosingFilter.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
97
```swift #if canImport(OpenGL) import OpenGL.GL3 #endif #if canImport(OpenGLES) import OpenGLES #endif #if canImport(COpenGLES) import COpenGLES.gles2 #endif #if canImport(COpenGL) import COpenGL #endif /* Unlike other filters, this one uses a grid of GL_POINTs to sample the incoming image in a grid. A custom vert...
/content/code_sandbox/framework/Source/Operations/Histogram.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
1,033
```swift public class LevelsAdjustment: BasicOperation { public var minimum:Color = Color(red:0.0, green:0.0, blue:0.0) { didSet { uniformSettings["levelMinimum"] = minimum } } public var middle:Color = Color(red:1.0, green:1.0, blue:1.0) { didSet { uniformSettings["levelMiddle"] = middle } } public var max...
/content/code_sandbox/framework/Source/Operations/LevelsAdjustment.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
379
```swift public class Solarize: BasicOperation { public var threshold:Float = 0.5 { didSet { uniformSettings["threshold"] = threshold } } public init() { super.init(fragmentShader:SolarizeFragmentShader, numberOfInputs:1) ({threshold = 0.5})() } } ```
/content/code_sandbox/framework/Source/Operations/Solarize.swift
swift
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
68
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); float greenCurveValue = texture2D(inputImageTexture2, vec2(textureColor.g, 0.0)).g; gl_FragColor = vec4(...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramEqualizationGreen_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
98
```glsl attribute vec4 position; attribute vec4 inputTextureCoordinate; attribute vec4 inputTextureCoordinate2; uniform float texelWidth; uniform float texelHeight; varying vec2 textureCoordinate; varying vec2 pointATextureCoordinate; varying vec2 pointBTextureCoordinate; varying vec2 pointCTextureCoordinate; varying...
/content/code_sandbox/framework/Source/Operations/Shaders/ColourFASTDecriptor.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
387
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float saturation; // Values from "Graphics Shaders: Theory and Practice" by Bailey and Cunningham const vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); void main() { vec4 textureColor = texture2D(inputImageTexture, textu...
/content/code_sandbox/framework/Source/Operations/Shaders/Saturation_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
141
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; varying highp vec2 textureCoordinate3; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; uniform sampler2D inputImageTexture3; uniform mediump mat3 colorConversionMatrix; void main() { mediump vec3 yuv; ...
/content/code_sandbox/framework/Source/Operations/Shaders/YUVConversionFullRangeUVPlanar_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
172
```glsl // Code from "Graphics Shaders: Theory and Practice" by M. Bailey and S. Cunningham varying vec2 textureCoordinate; varying vec2 leftTextureCoordinate; varying vec2 rightTextureCoordinate; varying vec2 topTextureCoordinate; varying vec2 topLeftTextureCoordinate; varying vec2 topRightTextureCoordinate; var...
/content/code_sandbox/framework/Source/Operations/Shaders/SobelEdgeDetection_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
373
```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/Erosion2_GL.fsh
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; uniform highp float fractionalWidthOfPixel; uniform highp float aspectRatio; void main() { highp vec2 sampleDivisor = vec2(fractionalWidthOfPixel, fractionalWidthOfPixel / aspectRatio); highp vec2 samplePos = textureCoord...
/content/code_sandbox/framework/Source/Operations/Shaders/Pixellate_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
111
```glsl precision highp float; varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; // Values from "Graphics Shaders: Theory and Practice" by Bailey and Cunningham const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordi...
/content/code_sandbox/framework/Source/Operations/Shaders/Luminance_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
119
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; void main() { gl_FragColor = texture2D(inputImageTexture, textureCoordinate); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Passthrough_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
37
```glsl attribute vec4 position; attribute vec4 inputTextureCoordinate; attribute vec4 inputTextureCoordinate2; attribute vec4 inputTextureCoordinate3; attribute vec4 inputTextureCoordinate4; attribute vec4 inputTextureCoordinate5; varying vec2 textureCoordinate; varying vec2 textureCoordinate2; varying vec2 textureCo...
/content/code_sandbox/framework/Source/Operations/Shaders/FiveInput.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
148
```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 ra; ...
/content/code_sandbox/framework/Source/Operations/Shaders/OverlayBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
435
```glsl attribute vec4 position; attribute vec4 inputTextureCoordinate; attribute vec4 inputTextureCoordinate2; attribute vec4 inputTextureCoordinate3; varying vec2 textureCoordinate; varying vec2 textureCoordinate2; varying vec2 textureCoordinate3; void main() { gl_Position = position; textureCoordinate = in...
/content/code_sandbox/framework/Source/Operations/Shaders/ThreeInput.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
94
```glsl // I'm using the Prewitt operator to obtain the derivative, then squaring the X and Y components and placing the product of the two in Z. // In tests, Prewitt seemed to be tied with Sobel for the best, and it's just a little cheaper to compute. // This is primarily intended to be used with corner detection filt...
/content/code_sandbox/framework/Source/Operations/Shaders/XYDerivative_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
476
```glsl attribute vec4 position; attribute vec4 inputTextureCoordinate; uniform mat4 transformMatrix; uniform mat4 orthographicMatrix; varying vec2 textureCoordinate; void main() { gl_Position = transformMatrix * vec4(position.xyz, 1.0) * orthographicMatrix; textureCoordinate = inputTextureCoordinate.xy; } `...
/content/code_sandbox/framework/Source/Operations/Shaders/Transform.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
69
```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/ColorLocalBinaryPattern_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
939
```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/ColorBurnBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
105
```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/ThresholdSketch_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
391
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float hazeDistance; uniform float slope; void main() { //todo reconsider precision modifiers vec4 color = vec4(1.0);//todo reimplement as a parameter float d = textureCoordinate.y * slope + hazeDistance; vec4 c = textu...
/content/code_sandbox/framework/Source/Operations/Shaders/Haze_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
125
```glsl attribute vec4 position; varying vec3 colorFactor; const vec3 W = vec3(0.2125, 0.7154, 0.0721); void main() { float luminance = dot(position.xyz, W); colorFactor = vec3(1.0, 1.0, 1.0); gl_Position = vec4(-1.0 + (luminance * 0.0078125), 0.0, 0.0, 1.0); gl_PointSize = 1.0; } ```
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramLuminanceSampling.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
123
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; const vec3 W = vec3(0.2125, 0.7154, 0.0721); void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); float luminance = dot(textureColor.rgb, W); float newLuminance ...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramEqualizationLuminance_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
220
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float texelWidth; uniform float texelHeight; uniform float upperThreshold; uniform float lowerThreshold; void main() { vec3 currentGradientAndDirection = texture2D(inputImageTexture, textureCoordinate).rgb; vec2 gradientDirec...
/content/code_sandbox/framework/Source/Operations/Shaders/DirectionalNonMaximumSuppression_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
233
```glsl attribute vec4 position; void main() { gl_Position = position; } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Line.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
17
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform lowp float brightness; void main() { lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); gl_FragColor = vec4((textureColor.rgb + vec3(brightness)), textureColor.w); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Brightness_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
70
```glsl attribute vec4 position; varying vec3 colorFactor; void main() { colorFactor = vec3(1.0, 0.0, 0.0); gl_Position = vec4(-1.0 + (position.x * 0.0078125), 0.0, 0.0, 1.0); gl_PointSize = 1.0; } ```
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramRedSampling.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
86
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform highp vec2 blurCenter; uniform highp float blurSize; void main() { // TODO: Do a more intelligent scaling based on resolution here highp vec2 samplingOffset = 1.0/100.0 * (blurCenter - textureCoordinate) * blurSize; ...
/content/code_sandbox/framework/Source/Operations/Shaders/ZoomBlur_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
331
```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(th...
/content/code_sandbox/framework/Source/Operations/Shaders/LuminanceThreshold_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
109
```glsl varying highp vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform highp float colorLevels; void main() { highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); gl_FragColor = floor((textureColor * colorLevels) + vec4(0.5)) / colorLevels; } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Posterize_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
75
```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/ColorLocalBinaryPattern_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
964
```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 highp vec2 textureCoordinate; uniform sampler2D inp...
/content/code_sandbox/framework/Source/Operations/Shaders/KuwaharaRadius3_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
2,786
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { vec4 base = texture2D(inputImageTexture, textureCoordinate); vec4 overlayer = texture2D(inputImageTexture2, textureCoordinate2); gl_FragCol...
/content/code_sandbox/framework/Source/Operations/Shaders/DarkenBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
127
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; // lookup texture uniform lowp float intensity; void main() { highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); highp f...
/content/code_sandbox/framework/Source/Operations/Shaders/Lookup_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
470
```glsl uniform sampler2D inputImageTexture; varying vec2 textureCoordinate; uniform float shadows; uniform float highlights; const vec3 luminanceWeighting = vec3(0.3, 0.3, 0.3); void main() { vec4 source = texture2D(inputImageTexture, textureCoordinate); float luminance = dot(source.rgb, luminanceWeighting)...
/content/code_sandbox/framework/Source/Operations/Shaders/HighlightShadow_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
298
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; uniform float topFocusLevel; uniform float bottomFocusLevel; uniform float focusFallOffRate; void main() { vec4 sharpImageColor = texture2D(inputImageTexture, textur...
/content/code_sandbox/framework/Source/Operations/Shaders/TiltShift_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
168
```glsl attribute vec4 position; varying vec2 currentPosition; uniform float aspectRatio; void main() { currentPosition = vec2(position.x, position.y * aspectRatio); gl_Position = position; } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Circle.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
42
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; uniform mat3 colorConversionMatrix; void main() { vec3 yuv; yuv.x = texture2D(inputImageTexture, textureCoordinate).r - (16.0/255.0); yuv.yz = texture2D...
/content/code_sandbox/framework/Source/Operations/Shaders/YUVConversionVideoRange_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
137
```glsl attribute vec4 position; attribute vec4 inputTextureCoordinate; attribute vec4 inputTextureCoordinate2; varying vec2 textureCoordinate; varying vec2 textureCoordinate2; void main() { gl_Position = position; textureCoordinate = inputTextureCoordinate.xy; textureCoordinate2 = inputTextureCoordinate2...
/content/code_sandbox/framework/Source/Operations/Shaders/TwoInput.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
67
```glsl uniform sampler2D inputImageTexture; varying highp vec2 textureCoordinate; varying highp vec2 leftTextureCoordinate; varying highp vec2 rightTextureCoordinate; varying highp vec2 topTextureCoordinate; varying highp vec2 topLeftTextureCoordinate; varying highp vec2 topRightTextureCoordinate; varyin...
/content/code_sandbox/framework/Source/Operations/Shaders/ThresholdedNonMaximumSuppression_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
523
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; uniform float mixturePercent; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); vec4 textureColor2 = texture2D(inputImageTexture2, tex...
/content/code_sandbox/framework/Source/Operations/Shaders/AlphaBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
107
```glsl precision highp float; varying vec2 centerTextureCoordinate; varying vec2 oneStepPositiveTextureCoordinate; varying vec2 oneStepNegativeTextureCoordinate; uniform sampler2D inputImageTexture; void main() { lowp vec4 centerIntensity = texture2D(inputImageTexture, centerTextureCoordinate); lowp vec4 on...
/content/code_sandbox/framework/Source/Operations/Shaders/Dilation1_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
145
```glsl varying highp vec2 textureCoordinate; varying highp vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; const highp vec3 W = vec3(0.2125, 0.7154, 0.0721); void main() { mediump vec4 base = texture2D(inputImageTexture, textureCoordinate); mediump vec4 ov...
/content/code_sandbox/framework/Source/Operations/Shaders/HardLightBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
475
```glsl /* ** Gamma correction ** Details: path_to_url */ #define GammaCorrection(color, gamma) pow(color, 1.0 / gamma) /* ** Levels control (input (+gamma), output) ** Details: path_to_url */ #define LevelsControlInputRange(color, minInput, maxInput) min(max(color - minInput, vec3(0.0)) / (maxInput - ...
/content/code_sandbox/framework/Source/Operations/Shaders/Levels_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
308
```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/ErosionDilation2.vsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
174
```glsl uniform vec4 circleColor; uniform vec4 backgroundColor; uniform vec2 center; uniform float radius; varying vec2 currentPosition; void main() { float distanceFromCenter = distance(center, currentPosition); float checkForPresenceWithinCircle = step(distanceFromCenter, radius); gl_FragColor = mix(ba...
/content/code_sandbox/framework/Source/Operations/Shaders/Circle_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
77
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; void main() { vec4 base = texture2D(inputImageTexture, textureCoordinate); vec4 overlayer = texture2D(inputImageTexture2, textureCoordinate2); gl_FragCol...
/content/code_sandbox/framework/Source/Operations/Shaders/MultiplyBlend_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
106
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float intensity; uniform vec3 firstColor; uniform vec3 secondColor; const vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); float lumin...
/content/code_sandbox/framework/Source/Operations/Shaders/FalseColor_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
122
```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; gl_FragColor = vec4(re...
/content/code_sandbox/framework/Source/Operations/Shaders/HistogramEqualizationRed_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
98
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float exposure; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); gl_FragColor = vec4(textureColor.rgb * pow(2.0, exposure), textureColor.w); } ```
/content/code_sandbox/framework/Source/Operations/Shaders/Exposure_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
66
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float rangeReduction; // Values from "Graphics Shaders: Theory and Practice" by Bailey and Cunningham const vec3 luminanceWeighting = vec3(0.2125, 0.7154, 0.0721); void main() { vec4 textureColor = texture2D(inputImageTexture, t...
/content/code_sandbox/framework/Source/Operations/Shaders/LuminanceRange_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
147
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform float aspectRatio; uniform vec2 center; uniform float radius; uniform float scale; void main() { vec2 textureCoordinateToUse = vec2(textureCoordinate.x, ((textureCoordinate.y - center.y) * aspectRatio) + center.y); float dist ...
/content/code_sandbox/framework/Source/Operations/Shaders/BulgeDistortion_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
178
```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/Kuwahara_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
904
```glsl varying vec2 textureCoordinate; varying vec2 textureCoordinate2; uniform sampler2D inputImageTexture; uniform sampler2D inputImageTexture2; uniform mat3 colorConversionMatrix; void main() { vec3 yuv; yuv.x = texture2D(inputImageTexture, textureCoordinate).r; yuv.yz = texture2D(inputImageText...
/content/code_sandbox/framework/Source/Operations/Shaders/YUVConversionFullRange_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
128
```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/Erosion3_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
304
```glsl // Color 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 vec3 ...
/content/code_sandbox/framework/Source/Operations/Shaders/ColorBlend_GLES.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
443
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform mat4 colorMatrix; uniform float intensity; void main() { vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); vec4 outputColor = textureColor * colorMatrix; gl_FragColor = (intensity * outputColor) +...
/content/code_sandbox/framework/Source/Operations/Shaders/ColorMatrix_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
85
```glsl varying vec2 textureCoordinate; uniform sampler2D inputImageTexture; uniform vec2 blurCenter; uniform float blurSize; void main() { // TODO: Do a more intelligent scaling based on resolution here vec2 samplingOffset = 1.0/100.0 * (blurCenter - textureCoordinate) * blurSize; vec4 fragmentColo...
/content/code_sandbox/framework/Source/Operations/Shaders/ZoomBlur_GL.fsh
glsl
2016-04-16T17:16:16
2024-08-09T08:27:34
GPUImage2
BradLarson/GPUImage2
4,858
321