프로젝트
GitHub에서 보기
keeffEoghan/glsl-optical-flow
소개
Optical flow shader for WebGL - BYORenderer.
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalglsl-optical-flow
Optical flow shader for WebGL - BYORenderer.
No drawing dependencies - for easier compatibility with any renderer which may rely on tracking the WebGL state (e.g: regl).
Installation
Install from npm using:
npm install @epok.tech/glsl-optical-flow
or:
yarn add @epok.tech/glsl-optical-flow
Usage
Check out the demo, and its source code, a comprehensive example of blurring input, blending across frames, and advecting by the flow to get smooth optical-flow over time:
You may also use this in your shader...
precision highp float;
uniform sampler2D next;
uniform sampler2D past;
uniform float offset;
uniform float lambda;
varying vec2 uv;
#pragma glslify: opticalFlow = require(@epok.tech/glsl-optical-flow)
void main() {
gl_FragColor = vec4(opticalFlow(uv, next, past, offset, lambda), 0.0, 1.0);
}
... or the provided fragment shader, for example, or for direct usage (with glslify).
See Also
Examples in the wild
- @tomorrowevening has developed a cool demo that explores the method and ways to use it.
Based on
- Original use in
tendrils. ofxFlowToolsarticle and code.PixelFlow.- Thomas DieWald.
- Adam Ferriss.
ofxMIOFlowGLSL, based on work by Andrew Benson.glslify.
관련 프로젝트 살펴보기
불러오는 중…
