webgpu-native / webgpu-headers

**NOT STABLE YET!** See README.
https://webgpu-native.github.io/webgpu-headers/
BSD 3-Clause "New" or "Revised" License
394 stars 45 forks source link

Should `SetBlendConstant` take float,float,float,float instead of WGPUColor? #378

Open kainino0x opened 1 month ago

kainino0x commented 1 month ago

WGPUColor is set up to use double because it can represent all of the possible render pass clear values - it's used as a union of f32, i32, and u32.

However, AFAIK, blending, and therefore wgpuRenderPassEncoderSetBlendConstant, never applies to sint/uint type textures, so should we just take four 32-bit floats instead? Slightly more efficient.

Kangz commented 1 month ago

I checked that all APIs do take 32bit floats.