mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-27 09:14:01 +00:00
[glsl-in] Respect user defined interpolation
This commit is contained in:
parent
6f21004369
commit
ec0d97d961
@ -419,12 +419,12 @@ impl Program {
|
||||
|
||||
if let Some(location) = location {
|
||||
let input = storage == StorageQualifier::Input;
|
||||
let interpolation = self.module.types[ty].inner.scalar_kind().map(|kind| {
|
||||
if let ScalarKind::Float = kind {
|
||||
Interpolation::Perspective
|
||||
} else {
|
||||
Interpolation::Flat
|
||||
}
|
||||
let interpolation = interpolation.or_else(|| {
|
||||
let kind = self.module.types[ty].inner.scalar_kind()?;
|
||||
Some(match kind {
|
||||
ScalarKind::Float => Interpolation::Perspective,
|
||||
_ => Interpolation::Flat,
|
||||
})
|
||||
});
|
||||
|
||||
let handle = self.module.global_variables.append(GlobalVariable {
|
||||
|
Loading…
Reference in New Issue
Block a user