webgpu / webgpu-samples

WebGPU Samples
https://webgpu.github.io/webgpu-samples/
BSD 3-Clause "New" or "Revised" License
1.77k stars 300 forks source link

Use a simpler `clearValue` #414

Closed greggman closed 6 months ago

greggman commented 6 months ago

This is obviously a personal preference but, ... I feel like the { r: ?, g: ?, b: ?, a: ? } format is left over from before the time when an array of numbers was allowed?

The array of numbers is arguably more useful since all kinds of things can easily provide an array of numbers. So, it seems like it would be good for the samples to show the more useful usage. That way devs are not mislead into thinking they need to take some array of numbers and convert it into the more verbose format.

wdyt?