kvark / vange-rs

Rusty Vangers clone
https://vange.rs
Apache License 2.0
427 stars 21 forks source link

Support GL backend: GL_INVALID_OPERATION: Mismatch between texture format and sampler type (signed/unsigned/float/shadow). #153

Closed caiiiycuk closed 2 years ago

caiiiycuk commented 2 years ago

I manage to start vangers-rs in borwser, however nothing is rendered (only blue screen). I think it related to this error:

(256) GL_INVALID_OPERATION: Mismatch between texture format and sampler type (signed/unsigned/float/shadow).
WebGL: too many errors, no more errors will be reported to the console for this context.

I think it's because I changed COLOR_FORMAT to Rgba8UnormSrgb, without it webgl can't create context with error:

panicked at 'Error in Surface::configure: requested format Bgra8Unorm is not in list of supported formats: [Rgba8UnormSrgb]

Can we do something with it?

caiiiycuk commented 2 years ago

FF error message:

WebGL warning: drawArraysInstanced: TEXTURE_2D at unit 0 is of type FLOAT, but the shader samples as UINT.
kvark commented 2 years ago

Please file the second issue separately.