kvark / vange-rs

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

WebGL: Painted shader not working (type is reserved keyword) #169

Closed caiiiycuk closed 2 years ago

caiiiycuk commented 2 years ago

You can test it locally or on the deployed link: https://caiiiycuk.github.io/vangers-web/vange-rs/

If you set render to Painted, then error occurs:

road.js:1461 panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_shader_module
      note: label = `terrain/paint`

Shader 'terrain/paint' parsing error: name `type` is a reserved keyword
    ┌─ wgsl:226:40
    │
226 │     [[location(1), interpolate(flat)]] type: u32;
    │                                        ^^^^ definition of `type`

    name `type` is a reserved keyword
kvark commented 2 years ago

Fixed in 0943a89d5f2eabe62133a49561075030f4e6c7da