Comments (6)
The demo should work with any base64 datauri or just a plain url like images/foo/bar.png
. It gets passed to the src
attribute of an <img>
tag, which is then uploaded to a texture. The demo assumes the texture is 512x512.
from glsl-fast-gaussian-blur.
p.s. Feel free to paste some code if you are having trouble. 😄
from glsl-fast-gaussian-blur.
Which function would I pass the image source to? Instead of:
var uri = require('baboon-image-uri')
could i something like:
var uri = 'http://google.com/someimage.jpg'
(I'm referring to line 13)
This is my repo:
https://github.com/amilajack/glsl-fast-gaussian-blur
from glsl-fast-gaussian-blur.
Yup, you should be able to just replace uri with anything. If you are using a cross-domain image (i.e. it's not hosted on the same server as your index.html
) then you may run into problems. You can try using crossOrigin
like this:
loadImg(url, { crossOrigin: 'anonymous' }, callback);
p.s. I pushed a slight change to use the load-img
module instead of img
, since the latter has changed authors from version 0.x to 1.x and is basically unstable. 😄
from glsl-fast-gaussian-blur.
For me, this works:
loadImage(uri, start)
// var someImage = 'https://upload.wikimedia.org/wikipedia/commons/d/d4/CH_cow_2_cropped.jpg'
// loadImage(someImage, { crossOrigin: 'anonymous' }, start)
and this doesn't
// loadImage(uri, start)
var someImage = 'https://upload.wikimedia.org/wikipedia/commons/d/d4/CH_cow_2_cropped.jpg'
loadImage(someImage, { crossOrigin: 'anonymous' }, start)
These are the only lines I changed after doing a fresh clone.
from glsl-fast-gaussian-blur.
The demo assumes the texture is 512x512
Is there a way to make this demo work with other image that are of different dimensions?
from glsl-fast-gaussian-blur.
Related Issues (12)
- Do both directions HOT 2
- Possible to apply this to Three.js objects? HOT 1
- Confusing function names HOT 2
- Edge wraps around. HOT 1
- Add rgb only optimized version HOT 1
- URL returns 404 HOT 1
- It's fast but doesnt work properly with large picture HOT 2
- should use / (resolution -1.0) instead ?
- Single pass? HOT 4
- How can I make this work with PraxisLIVE?
- Blur effect is not so smooth in my project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glsl-fast-gaussian-blur.