www.xbdev.net
xbdev - software development
Sunday April 20, 2025
Home | Contact | Support | WebGPU Graphics and Compute ...
     
 

WebGPU/WGSL Tutorials and Articles

Graphics and Compute ...

 


A Tale of Two Graphics API : WebGPU vs WebGL


WebGL is a long standing API that is love and hated by millions - it's stood the test of time - and has been used in an assortment of ways to use the GPU on the web. For all those years, WebGL ruled and there was no alternative! It was used and pushed to its limits as people did not have a choice!


WebGL and WebGPU API
WebGL and WebGPU API


But the times have changed! In the past couple of years a new API has been gradually introduced and integrated into browsers - introducing a new and alternative API for the web - Hello WebGPU.

Instead of continuing to develop and grow the WebGL API - it was decided to introduce a new API that could be develop from scratch - without all the old baggadge and problems.

Of course, while the WebGPU API is shiny and new - it's also 'new' - which means it doesn't have the years of battle testing and experiences that WebGL comes with. At the moment, WebGL is the more mature and experienced graphics API - while WebGPU is the young child stepping up to the table; with it comes a fresh new perspective... a new generation!

The word on the street is that WebGL will always be around... as it's a core part of the web and the web-standards ... but will no longer be updated with new features. While WebGPU will get all of the attention and updates - it is hoped that over the next decade - computers and the web will continue to grow in power - and WebGPU will be the tool to access this power (GPUs - or other parallel architectures, like TPUs, DPUs or QPUs).

Don't abandon WebGL yet!


WebGL is not NOT... dead... it's a key parts of the web-standards and will be for all time in the future. When deciding on which API to use for the web - it's not just about using the fastest, newest most powerful API - it's about which API do you need to do the job!

For instance, if you're not interesting in 3D or high-performance graphics - you might just opt for the traditional HTML Canvas API - which does what needs to do - it isn't trying to replace WebGL or WebGPU.

Remember WebGL is a battle tested API that has been around and is supported by nearly all web-browsers.


New Shader Language (WGSL)


What is more, the new graphics API doesn't use the existing shader languages - but it brings with it - its own shader language called 'WebGPU Shader Language' or WGSL.

This new language is sort of a mix of this and that - JavaScript, Hascall and C++ had a baby - it'd be something like this - it's a bit quirky and takes some time to get used to - but it was designed to meet the needs of shaders for the web (not just reinvent the already popular GLSL)

New shader language built from the ground up to support the new WebGPU API.

While WebGL goes hand-in-handwith GLSL, WebGPU goes hand-in-hand with WGSL.


There is no sideways compatability with the WebGPU and WGSL - especially the shader language - you can't use GLSL with the WebGPU API! Anymore than you can use WGSL with WebGL.

Demos and Examples


There are already a growing number of websites starting to take advantage of the WebGPU API - from high-performance games through to data-analysis and visualization applications.

Hundres of short WebGPU Examples on the WebGPU Lab:
Link WebGPU Lab


Links & Resources


• WGSL Language LINK
• WebGPU Lab LINK












101 WebGPU Programming Projects. WebGPU Development Pixels - coding fragment shaders from post processing to ray tracing! WebGPU by Example: Fractals, Image Effects, Ray-Tracing, Procedural Geometry, 2D/3D, Particles, Simulations WebGPU Games WGSL 2d 3d interactive web-based fun learning WebGPU Compute WebGPU API - Owners WebGPU Development Cookbook - coding recipes for all your webgpu needs! WebGPU & WGSL Essentials: A Hands-On Approach to Interactive Graphics, Games, 2D Interfaces, 3D Meshes, Animation, Security and Production Kenwright graphics and animations using the webgpu api 12 week course kenwright learn webgpu api kenwright programming compute and graphics applications with html5 and webgpu api kenwright real-time 3d graphics with webgpu kenwright webgpu for dummies kenwright webgpu wgsl compute graphics all in one kenwright webgpu api develompent a quick start guide kenwright webgpu by example 2022 kenwright webgpu gems kenwright webgpu interactive compute and graphics visualization cookbook kenwright wgsl webgpu shading language cookbook kenwright WebGPU Shader Language Development: Vertex, Fragment, Compute Shaders for Programmers Kenwright WGSL Fundamentals book kenwright WebGPU Data Visualization Cookbook kenwright Special Effects Programming with WebGPU kenwright WebGPU Programming Guide: Interactive Graphics and Compute Programming with WebGPU & WGSL kenwright Ray-Tracing with WebGPU kenwright



 
Advert (Support Website)

 
 Visitor:
Copyright (c) 2002-2025 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.