SlideShare a Scribd company logo
Speck&Tech 55
Give your Web App
superpowers by using GPUs
Hi, IÕm Giulio! !
" → #
$ % & '
@giuliozausa
I think GPUs are cool
Give your Web App superpowers by using GPUs
Skia
GPU Accelerated
2D Engine
(used by Chrome)
GPUs are insanely parallel processors
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Ok but I build websites,
how does this affects me?
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Figma
React & C++
2D GPU accelerated
Multi-level tile-based
rendering
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Challenges
Giant documents with thousands of parts
The entire document can be viewed at once
Everything at 60 FPS on medium-end hardware
Electrical properties calculation
Always running SPICE circuit simulator
Collaborative real-time multiplayer
Give your Web App superpowers by using GPUs
The OpenGL Pipeline
Shaders: vertex attributes
• Position (vec3)
• UV coord (vec2)
• Normal Vector (vec3)
• É
[posX,posY,posZ,uvX,uvY,nrmX,nrmY,nrmZ, posX,posY,posZ,uvX,uvY,nrmX,nrmY,nrmZ, ...]
Vertex Data:
Index Data:
|0 |1 |2
[0,2,1, 1,2,3, 2,4,3]
Shaders with GLSL
https://slidetodoc.com/objectives-simple-shaders-vertex-shader-fragment-shaders-programming/
Vertex + Fragment Shader
For each Vertex For each Pixel
Vertex Shader
Fragment Shader
Tooling & Ecosystem
Give your Web App superpowers by using GPUs
≈60 LOC
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
CPU/GPU Bottleneck
PCIe + RPC
Overhead
CPU/GPU Bottleneck
4kb 10000x drawMesh()
10000 instances
GPU
4kb x 10000
= 40mb
for (instance in instances) {
drawMesh(instance);
}
CPU/GPU Bottleneck 33 FPS
for (instance in instances) {
drawMesh(instance);
}
Instanced Rendering
4kb drawMeshes(10000)
10000 instances
GPU
4kb
for (instance in instances) {
drawMesh(instance);
}
drawMeshes(instances);
Instanced Rendering 120 FPS
for (instance in instances) {
drawMesh(instance);
}
drawMeshes(instances);
Instanced Rendering at scale
Index "T"
109,169,0
121,196,0
133,194,252
...
...
Ok, but what about
number crunching?
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Almost every browser Chrome/Edge only (for now)
Low Level Even Lower Level
One context per <canvas> Independent from <canvas>
GLSL Shading Language (C++ like) WGSL Shading Language (Rust like)
Fixed pipeline Customisable pipeline
Suitable for General Purpose
Computing!
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Give your Web App superpowers by using GPUs
Thank you!
Give your Web App superpowers by using GPUs
WebGPU: API
WGSL
2D Rendering: Text
https://css-tricks.com/techniques-for-rendering-text-with-webgl/
2D Rendering: Text
https://css-tricks.com/techniques-for-rendering-text-with-webgl/
Signed Distance Functions
https://css-tricks.com/techniques-for-rendering-text-with-webgl/
Multichannel Signed Distance Functions
Multichannel Signed Distance Functions

More Related Content

PDF
High Performance Graphics - Introduction to WebGPU - Next Generation of High ...
PDF
The Power of WebGL - Hackeando sua GPU com JavaScript
PPTX
Graphic Processing Unit (GPU)
PPTX
Graphics processing unit ppt
PDF
WT-4072, Rendering Web Content at 60fps, by Vangelis Kokkevis, Antoine Labour...
PDF
Power of WebGL (FSTO 2014)
PDF
iOS intro to 3D graphics with Metal
PDF
High performance graphics and computation - OpenGL ES and RenderScript
High Performance Graphics - Introduction to WebGPU - Next Generation of High ...
The Power of WebGL - Hackeando sua GPU com JavaScript
Graphic Processing Unit (GPU)
Graphics processing unit ppt
WT-4072, Rendering Web Content at 60fps, by Vangelis Kokkevis, Antoine Labour...
Power of WebGL (FSTO 2014)
iOS intro to 3D graphics with Metal
High performance graphics and computation - OpenGL ES and RenderScript

Similar to Give your Web App superpowers by using GPUs (20)

PPTX
Academy PRO: HTML5 API graphics
PDF
From Experimentation to Production: The Future of WebGL
PPT
Gpu presentation
PPTX
GPU Computing: A brief overview
PDF
High Performance Computing in web application
PDF
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Li...
PDF
Introduction to Webgl by Rachel Prudden
PPTX
Graphics pipelining
PDF
Gpgpu
PPTX
What is OpenGL ?
PPTX
HTML5DevConf 2013 (October): WebGL is a game changer!
PDF
WebGPU Compute - High Performance Compute Power - The Whats and Whys
PPTX
Penn graphics
PPTX
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
PPT
Introduction To Geometry Shaders
PDF
Leaving Flatland: Getting Started with WebGL- SXSW 2012
PPT
Programmable Piplelines
PDF
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
PDF
Minko - Flash Conference #5
PDF
You Don't Know WebGL at GREE Tech Talk #08
Academy PRO: HTML5 API graphics
From Experimentation to Production: The Future of WebGL
Gpu presentation
GPU Computing: A brief overview
High Performance Computing in web application
Пиксельные шейдеры для Web-разработчиков. Программируем GPU / Денис Радин (Li...
Introduction to Webgl by Rachel Prudden
Graphics pipelining
Gpgpu
What is OpenGL ?
HTML5DevConf 2013 (October): WebGL is a game changer!
WebGPU Compute - High Performance Compute Power - The Whats and Whys
Penn graphics
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
Introduction To Geometry Shaders
Leaving Flatland: Getting Started with WebGL- SXSW 2012
Programmable Piplelines
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
Minko - Flash Conference #5
You Don't Know WebGL at GREE Tech Talk #08
Ad

More from Speck&Tech (20)

PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
PDF
Persuasive AI: risks and opportunities in the age of digital debate
PDF
Fai da te ed elettricità, con la bobina di Tesla!
PDF
DIY ed elettronica ai tempi dell’università
PDF
Sotto il letto, sopra il cloud: costruirsi un’infrastruttura da zero
PDF
Verze e diamanti: oltre le nanotecnologie
PDF
Respira, sei in Trentino! Monitorare l'invisibile
PDF
Cognitive Robotics: from Babies to Robots and AI
PDF
Edge AI: Bringing Intelligence to Embedded Devices
PDF
Genere e gioco da tavolo: il caso di "Free to Choose"
PDF
SPaRKLE: un rivelatore compatto di radiazioni spaziali, realizzato dagli stud...
PDF
Il ruolo degli stati alterati di coscienza e degli psichedelici nella terapia
PDF
Unity3D: Things you need to know to get started
PDF
Learning from Biometric Fingerprints to prevent Cyber Security Threats
PDF
How do we program a God? - Do the Androids dream of the electric sheep?
PDF
The bad, the ugly and the weird about IoT
PDF
Arduino is Hardware, Software, IoT and Community
PDF
Computational privacy: balancing privacy and utility in the digital era
PDF
Il trucco c'è (e si vede) - Beatrice Mautino
PDF
ScrapeGraphAI: AI-powered web scraping, reso facile con l'open source
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Persuasive AI: risks and opportunities in the age of digital debate
Fai da te ed elettricità, con la bobina di Tesla!
DIY ed elettronica ai tempi dell’università
Sotto il letto, sopra il cloud: costruirsi un’infrastruttura da zero
Verze e diamanti: oltre le nanotecnologie
Respira, sei in Trentino! Monitorare l'invisibile
Cognitive Robotics: from Babies to Robots and AI
Edge AI: Bringing Intelligence to Embedded Devices
Genere e gioco da tavolo: il caso di "Free to Choose"
SPaRKLE: un rivelatore compatto di radiazioni spaziali, realizzato dagli stud...
Il ruolo degli stati alterati di coscienza e degli psichedelici nella terapia
Unity3D: Things you need to know to get started
Learning from Biometric Fingerprints to prevent Cyber Security Threats
How do we program a God? - Do the Androids dream of the electric sheep?
The bad, the ugly and the weird about IoT
Arduino is Hardware, Software, IoT and Community
Computational privacy: balancing privacy and utility in the digital era
Il trucco c'è (e si vede) - Beatrice Mautino
ScrapeGraphAI: AI-powered web scraping, reso facile con l'open source
Ad

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Spectral efficient network and resource selection model in 5G networks
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPT
Teaching material agriculture food technology
PPTX
MYSQL Presentation for SQL database connectivity
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Programs and apps: productivity, graphics, security and other tools
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Building Integrated photovoltaic BIPV_UPV.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Spectral efficient network and resource selection model in 5G networks
The AUB Centre for AI in Media Proposal.docx
Chapter 3 Spatial Domain Image Processing.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Teaching material agriculture food technology
MYSQL Presentation for SQL database connectivity
“AI and Expert System Decision Support & Business Intelligence Systems”
Diabetes mellitus diagnosis method based random forest with bat algorithm
Per capita expenditure prediction using model stacking based on satellite ima...
A comparative analysis of optical character recognition models for extracting...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

Give your Web App superpowers by using GPUs