mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-22 23:05:32 +00:00
f88ae5b28a
* Add parameterized Image type * nits * Update crates/spirv-std/src/lib.rs * Update crates/rustc_codegen_spirv/src/symbols.rs * Update crates/rustc_codegen_spirv/src/symbols.rs * Update symbols.rs
13 lines
278 B
Rust
13 lines
278 B
Rust
// build-pass
|
|
|
|
use spirv_std::{arch, Image};
|
|
|
|
#[spirv(fragment)]
|
|
pub fn main(
|
|
#[spirv(descriptor_set = 0, binding = 0)] image: &Image!(2D, format=rgba32f, sampled),
|
|
output: &mut glam::Vec4,
|
|
) {
|
|
let texel = image.fetch(glam::IVec2::new(0, 1));
|
|
*output = texel;
|
|
}
|