mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-21 22:34:34 +00:00
Renamed image::sample
to image::sample_with
This commit is contained in:
parent
43a267bbb8
commit
4edad8817c
@ -11,7 +11,7 @@ use core::arch::asm;
|
||||
mod params;
|
||||
|
||||
/// Contains extra image operands
|
||||
pub mod sample;
|
||||
pub mod sample_with;
|
||||
|
||||
pub use self::params::{ImageCoordinate, ImageCoordinateSubpassData, SampleType};
|
||||
pub use crate::macros::Image;
|
||||
@ -19,7 +19,7 @@ pub use spirv_std_types::image_params::{
|
||||
AccessQualifier, Arrayed, Dimensionality, ImageDepth, ImageFormat, Multisampled, Sampled,
|
||||
};
|
||||
|
||||
use sample::{NoneTy, SampleParams, SomeTy};
|
||||
use sample_with::{NoneTy, SampleParams, SomeTy};
|
||||
|
||||
use crate::{float::Float, integer::Integer, vector::Vector, Sampler};
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// build-pass
|
||||
|
||||
use spirv_std::spirv;
|
||||
use spirv_std::{arch, image::sample, image::ImageWithMethods, Image, Sampler};
|
||||
use spirv_std::{arch, image::sample_with, image::ImageWithMethods, Image, Sampler};
|
||||
|
||||
#[spirv(fragment)]
|
||||
pub fn main(
|
||||
@ -10,8 +10,8 @@ pub fn main(
|
||||
#[spirv(descriptor_set = 0, binding = 2)] image2: &Image!(2D, type=f32, sampled),
|
||||
output: &mut glam::Vec4,
|
||||
) {
|
||||
let t1 = image1.fetch_with(glam::IVec2::new(0, 0), sample::sample_index(1));
|
||||
let t2 = image2.sample_with(*sampler, glam::Vec2::new(0.5, 0.5), sample::bias(1.0));
|
||||
let t3 = image2.sample_with(*sampler, glam::Vec2::new(0.5, 0.5), sample::lod(2.0));
|
||||
let t1 = image1.fetch_with(glam::IVec2::new(0, 0), sample_with::sample_index(1));
|
||||
let t2 = image2.sample_with(*sampler, glam::Vec2::new(0.5, 0.5), sample_with::bias(1.0));
|
||||
let t3 = image2.sample_with(*sampler, glam::Vec2::new(0.5, 0.5), sample_with::lod(2.0));
|
||||
*output = t1 + t2 + t3;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user