CSS Shaders



CSS Shaders

3 21


reveal-shaders

Reveal.js presentation using CSS Shaders for transitions

On Github awgreenblatt / reveal-shaders

CSS Shaders

Slide Transition Method:Cube - Page - Concave - Linear (default) - Dissolve - Burn - Tile Flip

Note: Dissolve, Burn & Tile Flip are only viewable in Chrome Canary with CSS Shaders enabled

Two Kinds of Shaders

  • Vertex Shaders
  • Fragment Shaders

Vertex Shaders

CSS specifies mesh resolution, laid over HTML content Vertex shader called for each mesh vertex Named parameters can be passed into shader Shader calculates new 3D position of each mesh vertex Calculated varyings can be passed to fragment shader

Animating a CSS Shader

Mouse over the tree...

Fragment Shaders

CSS specifies named parameters, blend mode and compositing method Varyingx calculated in vertex shaders passed in as well Fragment shader called for every pixel New color or Mix color is calculated

Plasma Tree

Plasma shader adapted from work done by Viktor Korsun

Combining Vertex & Fragment Shaders

3D Page Curl With Lighting & Shading

Mouse over the page to start page curl

blattchat.com