kvark / vange-rs

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

Objects not lit on Intel/Linux/Vulkan #155

Closed kvark closed 2 years ago

kvark commented 2 years ago

vangers-intel-select-bug

Shader code:

[[stage(fragment)]]
fn color_fs(in: Varyings, [[builtin(front_facing)]] is_front: bool) -> [[location(0)]] vec4<f32> {
    return vec4<f32>(select(1.0, -1.0, is_front), select(1.0, -1.0, !is_front), 0.0, 1.0);
}

Explanation: regardless of whether is_front is true or false, one of the components of the resulting vector should end up being 1.0.

kvark commented 2 years ago

Looks to be fixed now. Not sure what exactly was going on :/

kvark commented 2 years ago

This is still an issue: vangers-intel-select-bug2

Anything related to is_front results in zeroes :(