This presentation was given at the HTML5 Dev Conf 2012 presentation held in San Francisco, California USA on Monday May 21rst. The slides are supporting the presentation, and do not have enough textual information to be understood by themselves.
The presentation is written in HTML5 and uses features that are only supported in a prototype implementation developed by Adobe of the Chromium browser which you can download here.
You can navigate with the left and right arrow keys and with the up/down keys to drill into sections.
The down arrow (bottom right corner) let's you navigate the sections
Vincent Hardy
Principal Scientist
Web Standards & Innovation
00 <style> 01 #myElement { 02 filter: <filter-function-or-reference>; 03 } 04 </style>
original
grayscale(1)
sepia(0.8)
saturate(0.2)
hue-rotate(90deg)
opacity(0.2)
invert(0.5)
brightness(0.25)
contrast(0.5)
blur(6px)
drop-shadow(...)
picture from iStockPhoto
toggle filter
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam dapibus volutpat mi id condimentum. Duis vel massa quis arcu eleifend condimentum a nec libero. Vestibulum consequat.
Mauris at mauris urna. Donec a risus quis metus rhoncus aliquet quis non urna. Curabitur sed pharetra dui. Donec varius est euismod nisl faucibus elementum. Suspendisse in diam id nibh elementum ornare. Aliquam sit amet tempor lectus. Nunc ornare ornare tellus, vitae gravida metus dignissim lobortis. Integer consequat elit eu augue consectetur sodales.
Morbi congue ultricies risus, quis laoreet dolor placerat vel. Mauris dignissim, diam sit amet dapibus fringilla, sem massa rhoncus mauris, non viverra nisl ipsum eu neque. Cras sollicitudin, leo et dapibus mattis, erat quam aliquam nisi, at dictum sapien sapien in libero. Pellentesque euismod pulvinar sem, sed condimentum purus consectetur eget.
00 <style>
01 #myElement {
02 filter: custom(<params>);
04 }
05 </style>
00 <style> 01 #myElement { 02 filter: custom(<vertex-shader> 04 [wsp<fragment-shader>] 05 [,<vertex-mesh>] 06 [,<params>]); 07 } 08 </style>
00 <style>
01 #myElement {
02 filter: custom(url(one-fold.vs), 2 2);
03 }
04 </style>
00 <style>
01 #myElement {
02 filter: custom(url(one-fold-2.vs)
03 url(one-fold-2.fs), 2 2);
04 }
05 </style>
00 <style>
01 #myElement {
02 filter: custom(url(one-fold-3.vs)
03 url(one-fold-3.fs), 2 2,
04 amount 0.5);
05 }
06 </style>
change the value of the amount parameter uniform:
00 precision mediump float;
01 attribute vec4 a_position;
02 attribute vec2 a_texCoord;
03 const float MAX_AMOUNT = 0.5;
04 uniform float amount;
05 uniform mat4 u_projectionMatrix;
06 varying float shadow;
07 void main() {
08 vec4 pos = vec4(a_position);
09 float a = clamp(amount, 0.0, 1.0) * MAX_AMOUNT;
10 float t = 1.0 - abs(pos.x / 0.5);
11 pos.y = (pos.y + t * a) / (1.0 + a);
12 shadow = t;
13 gl_Position = u_projectionMatrix * pos;
14 }
00 precision mediump float; 01 varying float shadow; 02 uniform float amount; 02 void main() { 03 float a = 1.0 - 0.25 * amount * shadow; 04 css_BlendColor = vec4(a, a, a, 1.0); 05 }
gl_FragColor
??00 #my-element, #my-other-element { 01 transition: filter 0.5s linear; 02 } 03 04 #my-element {filter: grayscale(1);} 05 #my-other-element { 06 filter: custom(url(wobble.vs), amount 0); 07 } 08 09 #my-element:hover {filter: grayscale(0);} 10 #my-other-element:hover { 11 filter: custom(url(wobble.vs), amount 1); 12 }
leading the web to its full graphical potential
Icons from the Noun project
Filter sample image and backgrounds from iStockPhoto
Textures from Subtle Patterns
Fonts