Open kpreid opened 2 years ago
Testing update: with wgpu 0.19.0 and the workaround code removed, colors are no longer corrupted as above. However, they appear to have incorrect gamma (and no actual HDR output to display), on both Chrome and Firefox.
This suggests that either wgpu or the browser is (inappropriately for this application) assuming the colors in the Rgba16Float
texture are sRGB encoded.
Testing: Same result as previous comment with wgpu 22.0.0.
Expected rendering (all-is-cubes-desktop):
Actual rendering (web):
It appears that any channel with a value above 1.0 gets 0.0 (whereas clamping might be more expected).
This is as of commit c49b52810515bcdd362e3dd4120bb68d89cfc8a1. If I revert to when
all-is-cubes
was usingwgpu
0.13,Rgba16Float
doesn't appear in the list of supported formats.Modifying a wgpu web example to use
Rgba16Float
and have some over-1 values does not reproduce the problem, so there is some kind of additional factor to discover (possibly something to do with my temporary frame buffer and optional tonemapping logic?).I am going to temporarily work around this by avoiding the Rgba16Float format in
choose_surface_format()
.