All Projects → vanruesc → Postprocessing

vanruesc / Postprocessing

Licence: zlib
A post processing library that provides the means to implement image filter effects for three.js.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Postprocessing

Threejs Sandbox
Set of experiments and extensions to THREE.js.
Stars: ✭ 163 (-80.36%)
Mutual labels:  webgl, three-js, effects
Threejs Webpack Es6 Boilerplate
A basic boilerplate for a Three.js project compiled with Webpack and transpiled via Babel to enable using ES6 syntax.
Stars: ✭ 267 (-67.83%)
Mutual labels:  webgl, three-js
3dio Js
JavaScript toolkit for interior apps
Stars: ✭ 255 (-69.28%)
Mutual labels:  webgl, real-time
Asterank
asteroid database, interactive visualizations, and discovery tools
Stars: ✭ 290 (-65.06%)
Mutual labels:  webgl, three-js
Patches
Patches is a visual programming editor for building WebVR and WebGL experiences.
Stars: ✭ 164 (-80.24%)
Mutual labels:  webgl, three-js
Particulate Medusae
Soft body jellyfish simulation.
Stars: ✭ 239 (-71.2%)
Mutual labels:  webgl, three-js
Glas
WebGL in WebAssembly with AssemblyScript
Stars: ✭ 278 (-66.51%)
Mutual labels:  webgl, three-js
React Tint
A React component that applies image processing filters to an image using Processing
Stars: ✭ 89 (-89.28%)
Mutual labels:  webgl, image-processing
Beam
✨ Expressive WebGL
Stars: ✭ 383 (-53.86%)
Mutual labels:  webgl, image-processing
Vue Gl
Vue.js components rendering 3D WebGL graphics reactively with three.js
Stars: ✭ 434 (-47.71%)
Mutual labels:  webgl, three-js
Ray Tracing Renderer
[UNMAINTAINED] Real-time path tracing on the web with three.js
Stars: ✭ 444 (-46.51%)
Mutual labels:  webgl, real-time
Normalmap.js
normalmap.js is a library for creating simple interactive lighting effects using normal maps.
Stars: ✭ 156 (-81.2%)
Mutual labels:  webgl, effects
Tracking With Darkflow
Real-time people Multitracker using YOLO v2 and deep_sort with tensorflow
Stars: ✭ 515 (-37.95%)
Mutual labels:  image-processing, real-time
TweetMigration
A WebGL heatmap of global Twitter activity
Stars: ✭ 42 (-94.94%)
Mutual labels:  real-time, three-js
Filament
Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2
Stars: ✭ 13,215 (+1492.17%)
Mutual labels:  webgl, real-time
Livecodelab
a web based livecoding environment
Stars: ✭ 276 (-66.75%)
Mutual labels:  webgl, three-js
Solarsys
Realistic Solar System simulation with three.js
Stars: ✭ 49 (-94.1%)
Mutual labels:  webgl, three-js
Cezanne
This is a project showing varied shading algorithms with a simple apple.
Stars: ✭ 85 (-89.76%)
Mutual labels:  webgl, three-js
Bild
Image processing algorithms in pure Go
Stars: ✭ 3,431 (+313.37%)
Mutual labels:  image-processing, effects
Roygbiv
A 3D engine for the Web
Stars: ✭ 499 (-39.88%)
Mutual labels:  webgl, three-js

Post Processing

CI Version Peer dependencies CDN

A post processing library that provides the means to implement image filter effects for three.js.

Demo · Sandbox · Documentation · Wiki

Installation

This library requires the peer dependency three.

npm install three postprocessing

Usage

Post processing introduces the concept of passes and effects to extend the common rendering workflow with fullscreen image manipulation tools. The following WebGL attributes should be used for an optimal post processing workflow:

import { WebGLRenderer } from "three";

const renderer = new WebGLRenderer({
	powerPreference: "high-performance",
	antialias: false,
	stencil: false,
	depth: false
});

The EffectComposer manages and runs passes. It is common practice to use a RenderPass as the first pass to automatically clear the buffers and render a scene for further processing. Fullscreen image effects are rendered via the EffectPass. Please refer to the usage example of three.js for more information on how to setup the renderer, scene and camera.

import { BloomEffect, EffectComposer, EffectPass, RenderPass } from "postprocessing";
import { Clock } from "three";

const composer = new EffectComposer(renderer);
composer.addPass(new RenderPass(scene, camera));
composer.addPass(new EffectPass(camera, new BloomEffect()));

const clock = new Clock();

requestAnimationFrame(function render() {

	requestAnimationFrame(render);
	composer.render(clock.getDelta());

});

Output Encoding

Simply set WebGLRenderer.outputEncoding to the desired target color space and postprocessing will follow suit. Built-in passes automatically encode colors when they render to screen and internal render operations are always performed in linear color space. It's recommended to enable high precision frame buffers when using sRGBEncoding:

import { HalfFloatType } from "three";

const composer = new EffectComposer(renderer, {
	frameBufferType: HalfFloatType
});

Performance

This library provides an EffectPass which automatically organizes and merges any given combination of effects. This minimizes the amount of render operations and makes it possible to combine many effects without the performance penalties of traditional pass chaining. Additionally, every effect can choose its own blend function.

All fullscreen render operations also use a single triangle that fills the screen. Compared to using a quad, this approach harmonizes with modern GPU rasterization patterns and eliminates unnecessary fragment calculations along the screen diagonal. This is especially beneficial for GPGPU passes and effects that use complex fragment shaders.

Performance Test

Included Effects

The total demo download size is about 60 MB.

Custom Effects

If you want to learn how to create custom effects or passes, please check the Wiki.

Contributing

Please refer to the contribution guidelines for details.

License

This library is licensed under the Zlib license.

The original code that this library is based on, was written by mrdoob and the three.js contributors and is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].