experience-monks / glsl-fast-gaussian-blur Goto Github PK
View Code? Open in Web Editor NEWoptimized single-pass blur shaders for GLSL
License: MIT License
optimized single-pass blur shaders for GLSL
License: MIT License
Why do the names of the functions blurN
not correspond to the actual numbers of sampled texels? blur5
for example, clearly only uses three texels in total, since it only calls texture2D()
three times. Am I missing something here? Is the function called blur5
, because if you apply it twice in perpendicular directions, you sample five distinct texels? Considering this library advertises itself as a single pass solution, should the functions not be named after the actual number of sampled points and not the theoretical number should one decide to apply the function twice?
It's quite fast, but after applying to large size picture like 750x1334.
The blur isn't enough even using blur13, any parameter to calculate how blur as i want?
The readme references this url, which returns a 404. What is the correct url?
For example, I have a bunch of quads with textures on them, they are all floating in 3D space. Can we apply this blur to each quad's texture?
The project description says "optimized single-pass blur shaders for GLSL"
I expected a shader with a 2d kernel, which can be applied in one pass. Instead, I am seeing only a linear blur filter which I must combine in multiple passes to get a workable result.
Am I missing something?
CodeSandbox: https://codesandbox.io/s/objective-bush-m81ne?file=/src/index.js
When blurred, the leftmost part of the image shows color from the rightmost part.
Hi! I'm looking for an efficient blur filter to use in PraxisLIVE. It can use GLSL fragment shaders, but since I'm not savvy in this regard, I don't know how to get your shaders working in that environment.
I'm sorry if this is a bad place to ask such questions. I'm trying to make a sound-rective visualiser for a live show fro open-source musicians (Sonoj.org) and I can't find anything that'll blur the image to add a glow effect.
A basic code for a simple video filter in PraxisLIVE looks like this:
uniform sampler2D texture;
uniform vec2 texOffset;
varying vec4 vertColor;
varying vec4 vertTexCoord;
void main() {
gl_FragColor = texture2D(texture, vertTexCoord.st) * vertColor;
}
I figured out I can scale the image or make it brighter with this or change the colors a bit, but I have no idea how to apply a more complex filter to an image. I tried to read some shaders, but most of them generate images out of thin air, and this one needs to work on an input image - and I can't wrap my head around this.
I'd appreciate some help :) I guess such shader could be distributed with PraxisLIVE for all to use, because it's a very basic tool for working with images.
In most cases, we only need to blur the rgb. It will be great to have that option.
Also, assuming the blurring is for the rgb color + opacity, blurring rgba individually doesn't work as expected anyway like mixing vec4(0.0, 0.0, 0.0, 0.0)
with vec4(1.0, 1.0, 1.0, 1.0)
will become grey with 50% opacity.
Should the direction be [0, 1]
here?
https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/demo/index.js#L52
Hi
I have a little bit confuse,
why you guys only picked up three fragment to calculate the sum , and the quality of blur is incredible smooth! ๐ฒ
but in my project is not so good:
Then I tried to use full of 5*5 pixels gauss blur and linear blur, the effect is good, but the FPS is too low ๐ข
Thanks
I have tried using the example with other image uri's and they don't seem to work. @Jam3 do you know what could be the cause of this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.