"Learn WebGPU just for fun"

A collection of interactive demos dedicated to learning WebGPU.

24. ArraySum GPU

Превью демо ArraySum GPU

WebGPU : calculate the sum of the array in compute shader.

23.SSAO

Превью демо PBR

Screen space ambient occlusion.

22.Deferred Rendering

Превью демо PBR

Deferred Rendering.
Basic implementation of deferred rendering on WebGPU.

21.PBR

Превью демо PBR

Physically based rendering.

20. ReversedZ

Превью демо ReversedZ

The example shows the use of the inverse z method to better exploit the precision of the depth buffer.

------------------------------------
Additional study materials

19. GLTF

Превью демо GLTF

Example of a basic GLTF load

Loading only one mesh without animations and other scene elements

------------------------------------
Additional study materials

18. Bloom

Превью демо Bloom

Bloom на WebGPU

17. Cube Map

Превью демо Shadow map

16. Matcap и MSAA

Превью демо Shadow map

Matcap implementation on WebGPU. Also uses MSAA.

15. Shadow map

Превью демо Shadow map

Implementation of Shadow map on WebGPU

14. Normal map

Превью демо Normal map

Implementation of Normal map on WebGPU

13. Instance & mult obj

Превью демо Point ligth Phong

Implementation of Instance on WebGPU

12. Point ligth Phong

Превью демо Point ligth Phong

Point light Phone implementation

11. Loading a mesh from an external file

Превью демо mesh_obj

Loading a mesh from an external file

1.OBJ format.
2.JSON format.

10. Post Effect

Превью демо Post Effect

Post Effect on WebGPU.

1.Loading an array of data into a texture.
2.Loading a fragment of a dynamic scene into another texture.
3.Change the color of the pixels of the current main texture.


9.Texture pixelation of the image

Превью демо quad_image

Simple post effect with 2D image.

We draw a texture on the plane and the image is pixelated


8. Texture import canvas

Превью демо Texture import canvas

Using 2D_Canvas as a texture.

Draw on 2D_Canvas, and place the result into a WebGPU texture


7. Texture mipmap on GPU

Превью демо Texture

Example of loading mipmap and generating mipmap on the GPU side.

Mipmap is generated by a separate shader and is loaded into the main texture for each mipmap level.


6. Texture mipmap on CPU

Превью демо Texture

Example of loading mipmap.

Mipmaps loaded as separate textures for each mipmap level


5. Load texture from Uint8Array

Превью демо Texture

Example Loading texture data from an array.

In this example, we create a texture using data from a Uint8Array. We use WebGPU to create the texture and display it on the screen.


4. Texture

Превью демо Texture

Example of using texture. Consideration of what is sampler, texture_2d, vUV.

Getting color from a texture using the texture Sample function.

3. Cube Rotation

Превью демо Cube Rotation

An example of the application of geometry transformation matrices. Perspective, view and model matrices.

2. Quad Buffer Index

Превью демо Quad Buffer Index

Rendering geometry using a vertex buffer and an index buffer.

1. Hello Triangle

Превью демо Hello Triangle

Initializing WebGPU and rendering the first triangle.