SlideShare a Scribd company logo
Benjamin Kenwright WebGPU API
Benjamin Kenwright
WebGPU API
Benjamin Kenwright
Lecture 1: Introduction
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Brief Overview
• Course Structure
• Background History/Trends
• Basic Concepts/WebGPU API
• Whats/Whys/Where
• WebGL vs WebGPU
• Shader Languages
• GLSL and new WGSL (WebGPU Shader Language)
• Discussion & Questions
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Who’s this Course for?
• Hobbyists, Academics, Beginners, Programmers, (Curious)
Any requirements?
• Basic programming knowledge (Loops/Variables)
• Basic web-based concepts (e.g., HTML/CSS/JS)
• Advantage but not required if you have some basic
‘graphics’ knowledge (e.g., color transforms, shaders, …)
Benjamin Kenwright WebGPU API
Benjamin Kenwright
What this course is ‘NOT’..
• Writing a Framework
• Learning a middleware (e.g.. ‘ThreeJS’)
• Writing a ‘full’ game (or complete complex application)
• Teaching computer graphics
This course is about ‘getting started’ – learning the raw API and using it
directly
• WebGPU API (Syntax & Blocks)
• Minimum working examples (MWE)
• Springboards to bigger projects
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Notes
• Warning…
• Supported Browsers (install)
• Involve coding! (Not ‘theoretical’)
• …
• Simple (MWE) Examples
• Clearing screen, flashing, …
• Buffers, geometry…
• Extending examples (step by step)
• Graphics then Compute
• ..
Activities after each Example
Question Slides (Think)
Stop Points
(Try and Test Yourself)
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Benjamin Kenwright WebGPU API
Benjamin Kenwright
What is the
WebGPU API?
Benjamin Kenwright WebGPU API
Benjamin Kenwright
What is the WebGPU API?
WebGPU API is a new Cross-Platform
2/3D Compute/Graphics API
(for the web)
High-level graphics/compute API that taps
“openness” of the Native GPU API
(Vulkan/DX/Metal)
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Why a new GPU API?
Do we need the WebGPU API?
Why not create just create WebGL 3?
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Technologies have changed
(Plan for Future)
New ways of thinking and
working
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Problems with Backward Compatibility
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Time for a tidy up!
New API (Fresh Start)
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Change how we approach the problem…
Tools, resources, technologies, …
Benjamin Kenwright WebGPU API
Benjamin Kenwright
(Multi GPUs)
GFLOPS
TFLOPS
Trends
GPU ‘Performance’
Time
FLOPS
Benjamin Kenwright WebGPU API
Benjamin Kenwright
GPU (Not just for ‘Graphics’)
AI
Physics (Simulations)
Security/Crypt
Analytics
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Is WebGL dead?
Does this mean WebGL is dead?
Won’t be supported anymore? RIP WebGL?
Benjamin Kenwright WebGPU API
Benjamin Kenwright
NO
WebGL is part of the W3c standards
Be around for a long time
New Tool
Benjamin Kenwright WebGPU API
Benjamin Kenwright
All APIs continue to evolve and be maintained to meet industry standards.
Provides a rich mix of open technologies for future innovation
Workhorse cross-platform API for professional 3D apps and gaming
1990s
Ubiquitous API for mobile gaming and general purpose graphics
2000s
Heterogeneous parallel computation
2008s
High-efficiency GPU graphics and compute API
2015
Graphics and compute API that exposes the
capabilities of GPU hardware for the Web
2022
Simplified Overview of the Open Graphics and Compute Standards
Web Graphics API (1.0)
2011
2013/17 WebGL 2.0
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Dangers and Challenges
• New API
• Not all fun and games
• Support/consistency
• Number of core principles
• Security Priority, Stability, Consistency
• New = Untested
Benjamin Kenwright WebGPU API
Benjamin Kenwright
API is ‘NEW’ (Final Changes)
• Final phases development tests/checks before release
• Check official specification (final updates)
• WebGPU API: https://www.w3.org/TR/webgpu/
• WGSL: https://www.w3.org/TR/WGSL/
Open standard
Benjamin Kenwright WebGPU API
Benjamin Kenwright
WebGPU multi-worker/tasks
1. Asynchronous texture & buffer uploads
2. Asynchronous shader compilation
3. Asynchronous pipeline state creation
4. Parallel rendering/encoding
5. Multiple threads/pool own command buffer
Textures (bindless)
GPU more fine-grained Visibility
No need to pass data back and forth between CPU and GPU
Important WebGPU Features
Opens the door…
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Do you have the WebGPU API?
Enabling API (Chrome Canary/Firefox Nightly/Edge Dev)
WebGPU is available (for Chrome Canary/Firefox Nightly/MS Edge
Dev) behind an experimental flag.
You can enable on:
Chrome -> chrome://flags
Firefox -> about:config
Edge -> edge://flags
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Stats: https://caniuse.com/webgpu
(Red – Disabled by Default)
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Small check – see if your browser has the WebGPU API
Note, as you’ll see later, just because you ‘have’ the API available, doesn’t necessarily mean you can use it (also
needs to have a driver/device)
Small JS Program
1
2
https://webgpulab.xbdev.net/index.php?page=editor&id=test&
Benjamin Kenwright WebGPU API
Benjamin Kenwright
1
navigator object contains information about the browser
(e.g., apis, such as, WebXR and WebGPU API)
You can always ‘list’ all the available entries in the navigator like this:
for (let n in navigator){ console.log( n ); }
2 navigator.gpu is the ‘webgpu’ api – if this is not ‘undefined’ you have the api
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Question
Who manages the WebGPU API?
(Organisation)
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Answer
Who manages the WebGPU API?
WebGPU is managed by Khronos
Group (working group). The
group includes Apple, Google,
Mozilla and Opera
Benjamin Kenwright WebGPU API
Benjamin Kenwright
What to find out more?
(Resources/Links)
Official website (official standard w3c
specification/documentation)
• WebGPU API
• WGSL
• Loads Examples Online/Websites
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Introduction to Ray-Tracing using WebGPU API
in 20 Minutes (Coffee Book Series)
ISBN-13 : 979-8842178605
Kenwright
WebGPU API: An Introduction
ISBN-13 : 979-8836435554
Kenwright
Benjamin Kenwright WebGPU API
Benjamin Kenwright
Stay Tuned Lecture 2
Benjamin Kenwright WebGPU API
Benjamin Kenwright
• New era
• Final stages (lots of opportunities/potential)
• Easy to get started (no excuse)
• Challenges/updates/fixes
• Must not forget about ‘security’, ‘stability’, …
• WebGPU driving future technologies to think outside the box
• WebGPU API is ‘NEW’ (untested)
• Example, try WebGPULab.com range examples
• …
Lots of examples and resources available….
Learn the basics first (makes it easy when debugging/fixing problems in more complex projects)

More Related Content

PDF
Introduction of WebGPU CTS
PDF
PDF
Introduction to blender
PPTX
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019
PPTX
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
PDF
Unsupervised learning represenation with DCGAN
PDF
Intro Pygame Capitulo 2
PPT
NVIDIA OpenGL 4.6 in 2017
Introduction of WebGPU CTS
Introduction to blender
Getting started with Ray Tracing in Unity 2019.3 - Unite Copenhagen 2019
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Unsupervised learning represenation with DCGAN
Intro Pygame Capitulo 2
NVIDIA OpenGL 4.6 in 2017

What's hot (20)

PPT
Crysis Next-Gen Effects (GDC 2008)
PDF
Checkerboard Rendering in Dark Souls: Remastered by QLOC
PPTX
The Rendering Technology of Killzone 2
PPT
SIGGRAPH Asia 2008 Modern OpenGL
PDF
Graphics Gems from CryENGINE 3 (Siggraph 2013)
KEY
Google I/O 2011, Android Accelerated Rendering
PDF
Dissecting the Rendering of The Surge
PDF
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
PPT
A Bit More Deferred Cry Engine3
PPTX
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
PDF
Introduction of openGL
PPTX
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
PPT
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
PDF
Precomputed Voxelized-Shadows for Large-scale Scene and Many lights
PPTX
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
PPTX
Past, Present and Future Challenges of Global Illumination in Games
PPTX
Triangle Visibility buffer
PPT
Stable SSAO in Battlefield 3 with Selective Temporal Filtering
PDF
WEB DEVELOPMENT USING REACT JS
PPTX
언리얼4 플레이어 컨트롤러의 이해.
Crysis Next-Gen Effects (GDC 2008)
Checkerboard Rendering in Dark Souls: Remastered by QLOC
The Rendering Technology of Killzone 2
SIGGRAPH Asia 2008 Modern OpenGL
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Google I/O 2011, Android Accelerated Rendering
Dissecting the Rendering of The Surge
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
A Bit More Deferred Cry Engine3
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Introduction of openGL
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Precomputed Voxelized-Shadows for Large-scale Scene and Many lights
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Past, Present and Future Challenges of Global Illumination in Games
Triangle Visibility buffer
Stable SSAO in Battlefield 3 with Selective Temporal Filtering
WEB DEVELOPMENT USING REACT JS
언리얼4 플레이어 컨트롤러의 이해.
Ad

Similar to benjamin kenwright webgpu api lecture 1.pptx (20)

PDF
High Performance Graphics - Introduction to WebGPU - Next Generation of High ...
PDF
WebGPU Compute - High Performance Compute Power - The Whats and Whys
PDF
Compute Programming - Parallel Power for Modern Computing
PPTX
HTML5DevConf 2013 (October): WebGL is a game changer!
PPTX
WebGL: Yesterday, Today, Tomorrow
PDF
[GREE Tech Talk #08] You Don't Know WebGL
PDF
You Don't Know WebGL at GREE Tech Talk #08
PPTX
Cgp lecture2 graphics_standard, opengl
PDF
Power of WebGL (FSTO 2014)
PDF
Html5 - Awesome APIs
PPTX
WebGL: The Next Generation
PDF
Special Effects Programming - Graphical Magic
PPTX
Academy PRO: HTML5 API graphics
PDF
Gpu computing-webgl
PDF
Zero con2019
PPT
WebGL: GPU acceleration for the open web
PDF
WebGL Insights 1st Edition Patrick Cozzi (Editor)
PDF
Demistifying the 3D Web
PDF
Demystifying the 3d web - Codemotion 2016
PDF
Demystifying the 3D Web by Pietro Grandi @ Codemotion Dubai 2016
High Performance Graphics - Introduction to WebGPU - Next Generation of High ...
WebGPU Compute - High Performance Compute Power - The Whats and Whys
Compute Programming - Parallel Power for Modern Computing
HTML5DevConf 2013 (October): WebGL is a game changer!
WebGL: Yesterday, Today, Tomorrow
[GREE Tech Talk #08] You Don't Know WebGL
You Don't Know WebGL at GREE Tech Talk #08
Cgp lecture2 graphics_standard, opengl
Power of WebGL (FSTO 2014)
Html5 - Awesome APIs
WebGL: The Next Generation
Special Effects Programming - Graphical Magic
Academy PRO: HTML5 API graphics
Gpu computing-webgl
Zero con2019
WebGL: GPU acceleration for the open web
WebGL Insights 1st Edition Patrick Cozzi (Editor)
Demistifying the 3D Web
Demystifying the 3d web - Codemotion 2016
Demystifying the 3D Web by Pietro Grandi @ Codemotion Dubai 2016
Ad

Recently uploaded (20)

PPTX
Internet Safety for Seniors presentation
PDF
Slides PDF: The World Game (s) Eco Economic Epochs.pdf
PPTX
E -tech empowerment technologies PowerPoint
PPTX
Database Information System - Management Information System
DOC
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
PPTX
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
PDF
Introduction to the IoT system, how the IoT system works
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PPTX
Funds Management Learning Material for Beg
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPTX
artificialintelligenceai1-copy-210604123353.pptx
PPTX
artificial intelligence overview of it and more
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PPTX
Slides PPTX: World Game (s): Eco Economic Epochs.pptx
PPTX
newyork.pptxirantrafgshenepalchinachinane
PDF
si manuel quezon at mga nagawa sa bansang pilipinas
PDF
Exploring VPS Hosting Trends for SMBs in 2025
Internet Safety for Seniors presentation
Slides PDF: The World Game (s) Eco Economic Epochs.pdf
E -tech empowerment technologies PowerPoint
Database Information System - Management Information System
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
Introduction to the IoT system, how the IoT system works
SASE Traffic Flow - ZTNA Connector-1.pdf
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
Funds Management Learning Material for Beg
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
Design_with_Watersergyerge45hrbgre4top (1).ppt
artificialintelligenceai1-copy-210604123353.pptx
artificial intelligence overview of it and more
Power Point - Lesson 3_2.pptx grad school presentation
Slides PPTX: World Game (s): Eco Economic Epochs.pptx
newyork.pptxirantrafgshenepalchinachinane
si manuel quezon at mga nagawa sa bansang pilipinas
Exploring VPS Hosting Trends for SMBs in 2025

benjamin kenwright webgpu api lecture 1.pptx

  • 1. Benjamin Kenwright WebGPU API Benjamin Kenwright WebGPU API Benjamin Kenwright Lecture 1: Introduction
  • 2. Benjamin Kenwright WebGPU API Benjamin Kenwright Brief Overview • Course Structure • Background History/Trends • Basic Concepts/WebGPU API • Whats/Whys/Where • WebGL vs WebGPU • Shader Languages • GLSL and new WGSL (WebGPU Shader Language) • Discussion & Questions
  • 3. Benjamin Kenwright WebGPU API Benjamin Kenwright Who’s this Course for? • Hobbyists, Academics, Beginners, Programmers, (Curious) Any requirements? • Basic programming knowledge (Loops/Variables) • Basic web-based concepts (e.g., HTML/CSS/JS) • Advantage but not required if you have some basic ‘graphics’ knowledge (e.g., color transforms, shaders, …)
  • 4. Benjamin Kenwright WebGPU API Benjamin Kenwright What this course is ‘NOT’.. • Writing a Framework • Learning a middleware (e.g.. ‘ThreeJS’) • Writing a ‘full’ game (or complete complex application) • Teaching computer graphics This course is about ‘getting started’ – learning the raw API and using it directly • WebGPU API (Syntax & Blocks) • Minimum working examples (MWE) • Springboards to bigger projects
  • 5. Benjamin Kenwright WebGPU API Benjamin Kenwright Notes • Warning… • Supported Browsers (install) • Involve coding! (Not ‘theoretical’) • … • Simple (MWE) Examples • Clearing screen, flashing, … • Buffers, geometry… • Extending examples (step by step) • Graphics then Compute • .. Activities after each Example Question Slides (Think) Stop Points (Try and Test Yourself)
  • 6. Benjamin Kenwright WebGPU API Benjamin Kenwright
  • 7. Benjamin Kenwright WebGPU API Benjamin Kenwright What is the WebGPU API?
  • 8. Benjamin Kenwright WebGPU API Benjamin Kenwright What is the WebGPU API? WebGPU API is a new Cross-Platform 2/3D Compute/Graphics API (for the web) High-level graphics/compute API that taps “openness” of the Native GPU API (Vulkan/DX/Metal)
  • 9. Benjamin Kenwright WebGPU API Benjamin Kenwright Why a new GPU API? Do we need the WebGPU API? Why not create just create WebGL 3?
  • 10. Benjamin Kenwright WebGPU API Benjamin Kenwright Technologies have changed (Plan for Future) New ways of thinking and working
  • 11. Benjamin Kenwright WebGPU API Benjamin Kenwright Problems with Backward Compatibility
  • 12. Benjamin Kenwright WebGPU API Benjamin Kenwright Time for a tidy up! New API (Fresh Start)
  • 13. Benjamin Kenwright WebGPU API Benjamin Kenwright Change how we approach the problem… Tools, resources, technologies, …
  • 14. Benjamin Kenwright WebGPU API Benjamin Kenwright (Multi GPUs) GFLOPS TFLOPS Trends GPU ‘Performance’ Time FLOPS
  • 15. Benjamin Kenwright WebGPU API Benjamin Kenwright GPU (Not just for ‘Graphics’) AI Physics (Simulations) Security/Crypt Analytics
  • 16. Benjamin Kenwright WebGPU API Benjamin Kenwright Is WebGL dead? Does this mean WebGL is dead? Won’t be supported anymore? RIP WebGL?
  • 17. Benjamin Kenwright WebGPU API Benjamin Kenwright NO WebGL is part of the W3c standards Be around for a long time New Tool
  • 18. Benjamin Kenwright WebGPU API Benjamin Kenwright All APIs continue to evolve and be maintained to meet industry standards. Provides a rich mix of open technologies for future innovation Workhorse cross-platform API for professional 3D apps and gaming 1990s Ubiquitous API for mobile gaming and general purpose graphics 2000s Heterogeneous parallel computation 2008s High-efficiency GPU graphics and compute API 2015 Graphics and compute API that exposes the capabilities of GPU hardware for the Web 2022 Simplified Overview of the Open Graphics and Compute Standards Web Graphics API (1.0) 2011 2013/17 WebGL 2.0
  • 19. Benjamin Kenwright WebGPU API Benjamin Kenwright Dangers and Challenges • New API • Not all fun and games • Support/consistency • Number of core principles • Security Priority, Stability, Consistency • New = Untested
  • 20. Benjamin Kenwright WebGPU API Benjamin Kenwright API is ‘NEW’ (Final Changes) • Final phases development tests/checks before release • Check official specification (final updates) • WebGPU API: https://www.w3.org/TR/webgpu/ • WGSL: https://www.w3.org/TR/WGSL/ Open standard
  • 21. Benjamin Kenwright WebGPU API Benjamin Kenwright WebGPU multi-worker/tasks 1. Asynchronous texture & buffer uploads 2. Asynchronous shader compilation 3. Asynchronous pipeline state creation 4. Parallel rendering/encoding 5. Multiple threads/pool own command buffer Textures (bindless) GPU more fine-grained Visibility No need to pass data back and forth between CPU and GPU Important WebGPU Features Opens the door…
  • 22. Benjamin Kenwright WebGPU API Benjamin Kenwright Do you have the WebGPU API? Enabling API (Chrome Canary/Firefox Nightly/Edge Dev) WebGPU is available (for Chrome Canary/Firefox Nightly/MS Edge Dev) behind an experimental flag. You can enable on: Chrome -> chrome://flags Firefox -> about:config Edge -> edge://flags
  • 23. Benjamin Kenwright WebGPU API Benjamin Kenwright
  • 24. Benjamin Kenwright WebGPU API Benjamin Kenwright Stats: https://caniuse.com/webgpu (Red – Disabled by Default)
  • 25. Benjamin Kenwright WebGPU API Benjamin Kenwright Small check – see if your browser has the WebGPU API Note, as you’ll see later, just because you ‘have’ the API available, doesn’t necessarily mean you can use it (also needs to have a driver/device) Small JS Program 1 2 https://webgpulab.xbdev.net/index.php?page=editor&id=test&
  • 26. Benjamin Kenwright WebGPU API Benjamin Kenwright 1 navigator object contains information about the browser (e.g., apis, such as, WebXR and WebGPU API) You can always ‘list’ all the available entries in the navigator like this: for (let n in navigator){ console.log( n ); } 2 navigator.gpu is the ‘webgpu’ api – if this is not ‘undefined’ you have the api
  • 27. Benjamin Kenwright WebGPU API Benjamin Kenwright Question Who manages the WebGPU API? (Organisation)
  • 28. Benjamin Kenwright WebGPU API Benjamin Kenwright Answer Who manages the WebGPU API? WebGPU is managed by Khronos Group (working group). The group includes Apple, Google, Mozilla and Opera
  • 29. Benjamin Kenwright WebGPU API Benjamin Kenwright What to find out more? (Resources/Links) Official website (official standard w3c specification/documentation) • WebGPU API • WGSL • Loads Examples Online/Websites
  • 30. Benjamin Kenwright WebGPU API Benjamin Kenwright Introduction to Ray-Tracing using WebGPU API in 20 Minutes (Coffee Book Series) ISBN-13 : 979-8842178605 Kenwright WebGPU API: An Introduction ISBN-13 : 979-8836435554 Kenwright
  • 31. Benjamin Kenwright WebGPU API Benjamin Kenwright Stay Tuned Lecture 2
  • 32. Benjamin Kenwright WebGPU API Benjamin Kenwright • New era • Final stages (lots of opportunities/potential) • Easy to get started (no excuse) • Challenges/updates/fixes • Must not forget about ‘security’, ‘stability’, … • WebGPU driving future technologies to think outside the box • WebGPU API is ‘NEW’ (untested) • Example, try WebGPULab.com range examples • … Lots of examples and resources available…. Learn the basics first (makes it easy when debugging/fixing problems in more complex projects)