itch.io is community of indie game creators and players

Devlogs

Add support for webGPU fragment lighting

Construct 3 3DObject Plugin - SDK V1 only
A browser asset pack made in HTML5

Add support for webGPU fragment lighting, also in worker mode.

In terms of performance, I have not yet discovered the details, but webGPU renderer seems to take more CPU performance than webGL2. Additionally, looking at the GPU performance of fragment lighting, GPU performance for webgl2 and webgpu seem similar, if not webgl2 is a little better. Update: I realized that the CPU calculated rotation/scale/translation for webGPU is included in the CPU 'Draw Calls' bucket, so this is why it takes more performance, not due to anything inherent in webGPU render. There may be a possibility to include this task in the worker side, which may be worthwhile for complex higher poly models.

As per usual devs should measure their own performance and make comparisons, which can depend on usage and other GPU/CPU usage.

In terms of implementation details, it is more difficult to use the GPU to do rotation for 3DObject with the C3 webGPU vertex shader and enabling frag lighting. , so when frag lighting is enabled rotation is performed on the CPU, though the impact does not see like an issue, especially if worker animation mode is used for larger animated models.

Files

  • 3DObject-2-61-0.c3addon 114 kB
    Mar 13, 2024
Download Construct 3 3DObject Plugin - SDK V1 only
Read comments (2)