All Projects β†’ gl-transitions β†’ Gl Transitions

gl-transitions / Gl Transitions

The open collection of GL Transitions

Projects that are alternatives of or similar to Gl Transitions

Hamburger React
Animated hamburger menu icons for React (1.5 KB) πŸ”
Stars: ✭ 391 (-55.42%)
Mutual labels:  transition, transitions
Shadereditorextension
Google Chrome DevTools extension to live edit WebGL GLSL shaders
Stars: ✭ 539 (-38.54%)
Mutual labels:  webgl, glsl
Pmtech
Lightweight, multi-platform, data-oriented game engine.
Stars: ✭ 478 (-45.5%)
Mutual labels:  webgl, glsl
Wireframe World
An infinite wireframe world in WebGL
Stars: ✭ 347 (-60.43%)
Mutual labels:  webgl, glsl
Month Of Shaders
One GLSL shader for every day of the month August
Stars: ✭ 12 (-98.63%)
Mutual labels:  webgl, glsl
Shader Doodle
A friendly web-component for writing and rendering shaders.
Stars: ✭ 356 (-59.41%)
Mutual labels:  webgl, glsl
Awesome Glsl
πŸŽ‡ Compilation of the best resources to learn programming OpenGL Shaders
Stars: ✭ 530 (-39.57%)
Mutual labels:  webgl, glsl
Html Gl
Get as many FPS as you need and amazing effects by rendering HTML/CSS in WebGL
Stars: ✭ 3,391 (+286.66%)
Mutual labels:  webgl, glsl
Regl Fire
Fire particle system made with regl
Stars: ✭ 16 (-98.18%)
Mutual labels:  webgl, glsl
Polygon Shredder
The polygon shredder that takes many cubes and turns them into confetti
Stars: ✭ 686 (-21.78%)
Mutual labels:  webgl, glsl
Aladino
πŸ§žβ€β™‚οΈ Your magic WebGL carpet
Stars: ✭ 225 (-74.34%)
Mutual labels:  webgl, glsl
Wagner
Effects composer for three.js
Stars: ✭ 930 (+6.04%)
Mutual labels:  webgl, glsl
Music Player
From UI Proposal to Code πŸŽΆβ–ΆοΈ
Stars: ✭ 3,459 (+294.41%)
Mutual labels:  transition, transitions
Veda
⚑VJ / Live Coding on Atom⚑
Stars: ✭ 373 (-57.47%)
Mutual labels:  webgl, glsl
Ffmpeg Gl Transition
FFmpeg filter for applying GLSL transitions between video streams.
Stars: ✭ 335 (-61.8%)
Mutual labels:  glsl, transitions
Regl Cnn
Digit recognition with Convolutional Neural Networks in WebGL
Stars: ✭ 490 (-44.13%)
Mutual labels:  webgl, glsl
Webclgl
GPGPU Javascript library 🐸
Stars: ✭ 313 (-64.31%)
Mutual labels:  webgl, glsl
Eternal
πŸ‘Ύ~ music, eternal ~ πŸ‘Ύ
Stars: ✭ 323 (-63.17%)
Mutual labels:  webgl, glsl
Glchaos.p
3D GPUs Strange Attractors and Hypercomplex Fractals explorer - up to 256 Million particles in RealTime
Stars: ✭ 590 (-32.73%)
Mutual labels:  webgl, glsl
Fieldplay
A vector field explorer
Stars: ✭ 922 (+5.13%)
Mutual labels:  webgl, glsl

Each commit that gets to gl-transitions/gl-transitions's master automatically generate a new npm minor release.

npm version Build Status


GL Transition Specification v1

NB. This is a technical documentation, for more informal information, please see https://gl-transitions.com/ homepage.

This document specifies GL Transition Specification v1, 1 as in gl-transitions @ 1 (consistently to the NPM package major). For any breaking changes in this specification, semver will be respected and the major will get bumped.

What is a transition?

A Transition is an animation that smoothly animates the intermediary steps between 2 textures: from and to. The step is specified by a progress value that moves from 0.0 to 1.0.

important feature to respect: When progress is 0.0, exclusively the from texture must be rendered. When progress is 1.0, exclusively the to texture must be rendered.

GL Transition

// transition of a simple fade.
vec4 transition (vec2 uv) {
  return mix(
    getFromColor(uv),
    getToColor(uv),
    progress
  );
}

A GL Transition is a GLSL code that implements a transition function which takes a vec2 uv pixel position and returns a vec4 color. This color represents the mix of the from to the to textures based on the variation of a contextual progress value from 0.0 to 1.0.

Contextual variables

  • progress (float): a value that moves from 0.0 to 1.0 during the transition.
  • ratio (float): the ratio of the viewport. It equals width / height. (width and height are not exposed because you don't need them. A transition code should be scalable to any size. ratio can still be used to preserve some shape ratio, e.g. you want to draw squares)

Contextual functions

  • vec4 getFromColor(vec2 uv): lookup the "from" texture at a given uv coordinate.
  • vec4 getToColor(vec2 uv): lookup the "to" texture at a given uv coordinate.

don't directly use texture2D to get a texture pixel out of from and to textures. Instead, use getFromColor(vec2) and getToColor(vec2). That way, the "implementer" can properly implement ratio preserving support as well as chosing a different color for the "out of bound" case.

Transition parameters

Transition parameters are parameters than the final user can set to tweak the transition. They are constant over a full run of a transition (no parameter changes when progress moves from 0.0 to 1.0).

any constant you define in your transitions are potential parameters to expose.

When you define a transition parameter, you must also define a default value that will get set in case the final user didn't provided it. It's unfortunately not possible to initialize a uniform in GLSL 120 (WebGL 1) but we support commented code // = value

Examples:

uniform float foo; // = 42.0
uniform vec2 foo; // = vec2(42.0, 42.0)

The following variants are also supported:

uniform float foo/* = 42.0 */;
uniform vec2 foo /*= vec2(42.0, 42.0)*/, bar /* = vec2(1.) */;
uniform vec2 foo, bar; // = vec2(1.0, 2.0); // both at the same time ! (needs a ';' if you have this second //, like usual glsl code)

gl-transitions

TBD this is not finished to be written. just keeping these notes around...

  • If we have duplicated transitions or one transition is more generic than another one, we don't necessary drop the less generic one: it might be more performant and might fit for some users. We also want to keep backward compat'. if we still want to drop it, what we will do is to deprecate it and drop it at the next major bump.
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].