Pixel shaders
for
Web developers
And how they can be used
in regular Web apps
Denis Radin
@PixelsCommander
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
State of the art games engineering
+
Using React/Redux for
managing HTML UI and game graphics
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
How many languages are
well supported on the Web?
We all know four
HTML, CSS, JS, SVG
Here they are
Actually there are more
HTML, CSS, JS, SVG, …?
GLSL
It is cool and special
GLSL works everywhere
OpenGL do
JS, C++, C#, Java, Unity, Swift etc.
Technology behind
games visual effects
Technology behind
parallel processing on GPU
So you can mine
cryptocurrencies with GLSL
And of course you can
develop UI components
with GLSL
Got interested enough?
In diving deeper?
History of GLSL
When? and why?
OpenGL pipeline before GLSL
Not customizable
Fog please!
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
fogValue = distanceToCamera * fogDensity;
pixelColor = currentColor * (fogColor * fogValue);
For every pixel
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
GLSL shaders introduced
in OpenGL v2
2004
OpenGL pipeline with GLSL
GLSL features
Because it is really special
So runs on a <canvas />
A part of WebGL
Compiles on GPU
Quiсkly and close to hardware
Cross platform
Since compiled every time
Highly optimized
Since compiled on hardware
for hardware
Parallel execution
GTX 970 runs
1664 shader processes at once
Parallel execution
Means the data is sent once
per whole pass for all elements
Strict typing
float, integer, boolean,
vec2, vec3, vec4
mat2, mat3, mat4
Designed for math
distance, dot, clamp, min / max, abs,
pow, mod, sin, cos, tan, artan etc.
Simplest meaningful shader
thebookofshaders.com/
edit.php
pixelscommander.com
Once a fall morning...
Once a fall morning...
I`ve got an issue on JIRA
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
It was ok
But sometimes...
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
background-position
change triggers repaint
Reimplementing with GPU
transformations
shift towards opacity
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
Reimplementing with GPU
transformations
shift towards opacity
No repaints!
Win, win, win!
Next day...
Denis please make us same spinner
which is blue and other width of a line
8.5 Mb RAM+100 Kb to load
for a single spinner
150*120*120*4=8,64 mb of RAM
to keep layers textures
And every sprite sheet itself is 100 Kb to load...
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
We have a problem
Approach is just not flexible enough
GLSL to the rescue
Shaders allow to render component flexibly
still keeping it on GPU
editor.thebookofshaders.com
Please open this URL to get hands on
shader development experience
Refined Github
Please install this browser extension
github.com/PixelsCommander/
pixel-shaders-workshop
Please open this repo and check commits there
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
URL
Please open this URL to get hands on
shader development experience
How to use
GLSL component in
your Web application?
npm i glsl-component
<glsl-component style=”width:100px; height:100px;”>
Your shader code
</glsl-component>
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)
The book of shaders
Might be the next step
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)

More Related Content

PDF
Pixel shaders based UI components + writing your first pixel shader
PPTX
Looking glassrenderinglt en
PPTX
Pokelabo flash 2013/4
PPTX
Wp7 performance challenges
PDF
Scale Machine - Valentyn Ostakh
PPT
Fast rendering with starling
PDF
Peint talk
PPTX
Html5 (games)
Pixel shaders based UI components + writing your first pixel shader
Looking glassrenderinglt en
Pokelabo flash 2013/4
Wp7 performance challenges
Scale Machine - Valentyn Ostakh
Fast rendering with starling
Peint talk
Html5 (games)

What's hot (14)

PDF
WebRender (MadRust)
PDF
Power of WebGL (FSTO 2014)
PDF
iOS intro to 3D graphics with Metal
PPTX
By VISY - ""In the country of the blind, the one-eyed man is king""
PDF
Creating Compelling Graphics - by Genera
PDF
The Power of WebGL - Hackeando sua GPU com JavaScript
PDF
PDF
10 things I've learned when working with html5 canvas
PDF
WebGL: 3D Graphics for the Web
PPTX
Html5 Canvas and Mobile Graphics
PDF
Parallel Computing into Javascript
PPTX
Presentation on Fresco
PPTX
Saving a century a day: how the Fresco library works
ZIP
Writing 3D Applications Using ruby-processing
WebRender (MadRust)
Power of WebGL (FSTO 2014)
iOS intro to 3D graphics with Metal
By VISY - ""In the country of the blind, the one-eyed man is king""
Creating Compelling Graphics - by Genera
The Power of WebGL - Hackeando sua GPU com JavaScript
10 things I've learned when working with html5 canvas
WebGL: 3D Graphics for the Web
Html5 Canvas and Mobile Graphics
Parallel Computing into Javascript
Presentation on Fresco
Saving a century a day: how the Fresco library works
Writing 3D Applications Using ruby-processing
Ad

Similar to Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global) (20)

PPT
CS 354 Programmable Shading
PPTX
OpenGL Shading Language
PPTX
Demystifying shaders
PPTX
Demystifying shaders
PPTX
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
PPTX
Getting started with open gl es 2
PDF
Gdc 14 bringing unreal engine 4 to open_gl
PDF
Computer Graphics - Lecture 01 - 3D Programming I
PPTX
OpenGL - Bringing the 3D World into the Android
PPT
Programmable Piplelines
PDF
Leaving Flatland: Getting Started with WebGL- SXSW 2012
PDF
GL Shading Language Document by OpenGL.pdf
PDF
Open gl
PDF
"Graphical fun With WebGL shaders", Martin Splitt
PPTX
Opengl lec 3
PPT
Introduction to 3D and shaders
PPT
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
PDF
Installing Games Sucks, Learn WebGL
PPT
Praseed Pai
CS 354 Programmable Shading
OpenGL Shading Language
Demystifying shaders
Demystifying shaders
GFX Part 6 - Introduction to Vertex and Fragment Shaders in OpenGL ES
Getting started with open gl es 2
Gdc 14 bringing unreal engine 4 to open_gl
Computer Graphics - Lecture 01 - 3D Programming I
OpenGL - Bringing the 3D World into the Android
Programmable Piplelines
Leaving Flatland: Getting Started with WebGL- SXSW 2012
GL Shading Language Document by OpenGL.pdf
Open gl
"Graphical fun With WebGL shaders", Martin Splitt
Opengl lec 3
Introduction to 3D and shaders
Lighting & Shading in OpenGL Non-Photorealistic Rendering.ppt
Installing Games Sucks, Learn WebGL
Praseed Pai
Ad

More from Ontico (20)

PDF
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
PDF
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
PPTX
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
PDF
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
PDF
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
PDF
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
PDF
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
PDF
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
PPTX
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
PPTX
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
PDF
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
PPTX
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
PPTX
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
PDF
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
PPT
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
PPTX
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
PPTX
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
PPTX
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
PPTX
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
PDF
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...
One-cloud — система управления дата-центром в Одноклассниках / Олег Анастасье...
Масштабируя DNS / Артем Гавриченков (Qrator Labs)
Создание BigData-платформы для ФГУП Почта России / Андрей Бащенко (Luxoft)
Готовим тестовое окружение, или сколько тестовых инстансов вам нужно / Алекса...
Новые технологии репликации данных в PostgreSQL / Александр Алексеев (Postgre...
PostgreSQL Configuration for Humans / Alvaro Hernandez (OnGres)
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Опыт разработки модуля межсетевого экранирования для MySQL / Олег Брославский...
ProxySQL Use Case Scenarios / Alkin Tezuysal (Percona)
MySQL Replication — Advanced Features / Петр Зайцев (Percona)
Внутренний open-source. Как разрабатывать мобильное приложение большим количе...
Подробно о том, как Causal Consistency реализовано в MongoDB / Михаил Тюленев...
Балансировка на скорости проводов. Без ASIC, без ограничений. Решения NFWare ...
Перехват трафика — мифы и реальность / Евгений Усков (Qrator Labs)
И тогда наверняка вдруг запляшут облака! / Алексей Сушков (ПЕТЕР-СЕРВИС)
Как мы заставили Druid работать в Одноклассниках / Юрий Невиницин (OK.RU)
Разгоняем ASP.NET Core / Илья Вербицкий (WebStoating s.r.o.)
100500 способов кэширования в Oracle Database или как достичь максимальной ск...
Apache Ignite Persistence: зачем Persistence для In-Memory, и как он работает...
Механизмы мониторинга баз данных: взгляд изнутри / Дмитрий Еманов (Firebird P...

Recently uploaded (20)

PDF
Performance, energy consumption and costs: a comparative analysis of automati...
PPTX
240409 Data Center Training Programs by Uptime Institute (Drafting).pptx
PDF
IAE-V2500 Engine Airbus Family A319/320
PDF
ANTIOXIDANT AND ANTIMICROBIAL ACTIVITIES OF ALGERIAN POPULUS NIGRA L. BUDS EX...
PDF
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
PPTX
Research Writing, Mechanical Engineering
PPTX
22ME926Introduction to Business Intelligence and Analytics, Advanced Integrat...
PDF
B461227.pdf American Journal of Multidisciplinary Research and Review
PPTX
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
PPTX
L1111-Important Microbial Mechanisms.pptx
PPTX
Module 1 – Introduction to Computer Networks: Foundations of Data Communicati...
PDF
Electrical & Computer Engineering: An International Journal (ECIJ)
PDF
Engineering Solutions for Ethical Dilemmas in Healthcare (www.kiu.ac.ug)
PDF
Recent Trends in Network Security - 2025
PDF
PhD defense presentation in field of Computer Science
PPTX
Cloud Security and Privacy-Module-1.pptx
PPTX
quantum theory on the next future in.pptx
PPT
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
PDF
1.-fincantieri-investor-presentation2.pdf
PDF
Software defined netwoks is useful to learn NFV and virtual Lans
Performance, energy consumption and costs: a comparative analysis of automati...
240409 Data Center Training Programs by Uptime Institute (Drafting).pptx
IAE-V2500 Engine Airbus Family A319/320
ANTIOXIDANT AND ANTIMICROBIAL ACTIVITIES OF ALGERIAN POPULUS NIGRA L. BUDS EX...
MACCAFERRY GUIA GAVIONES TERRAPLENES EN ESPAÑOL
Research Writing, Mechanical Engineering
22ME926Introduction to Business Intelligence and Analytics, Advanced Integrat...
B461227.pdf American Journal of Multidisciplinary Research and Review
INTERNET OF THINGS - EMBEDDED SYSTEMS AND INTERNET OF THINGS
L1111-Important Microbial Mechanisms.pptx
Module 1 – Introduction to Computer Networks: Foundations of Data Communicati...
Electrical & Computer Engineering: An International Journal (ECIJ)
Engineering Solutions for Ethical Dilemmas in Healthcare (www.kiu.ac.ug)
Recent Trends in Network Security - 2025
PhD defense presentation in field of Computer Science
Cloud Security and Privacy-Module-1.pptx
quantum theory on the next future in.pptx
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
1.-fincantieri-investor-presentation2.pdf
Software defined netwoks is useful to learn NFV and virtual Lans

Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Liberty Global)