update compute_shader_game_of_life example
This commit is contained in:
parent
c4672a34d2
commit
a2d8f253a9
@ -51,17 +51,9 @@ fn main() {
|
||||
}
|
||||
|
||||
fn setup(mut commands: Commands, mut images: ResMut<Assets<Image>>) {
|
||||
let mut image = Image::new_fill(
|
||||
Extent3d {
|
||||
width: SIZE.0,
|
||||
height: SIZE.1,
|
||||
depth_or_array_layers: 1,
|
||||
},
|
||||
TextureDimension::D2,
|
||||
&[0, 0, 0, 255],
|
||||
TextureFormat::R32Float,
|
||||
RenderAssetUsages::RENDER_WORLD,
|
||||
);
|
||||
let mut image = Image::new_target_texture(SIZE.0, SIZE.1, false);
|
||||
image.asset_usage = RenderAssetUsages::RENDER_WORLD;
|
||||
image.texture_descriptor.format = TextureFormat::R32Float;
|
||||
image.texture_descriptor.usage =
|
||||
TextureUsages::COPY_DST | TextureUsages::STORAGE_BINDING | TextureUsages::TEXTURE_BINDING;
|
||||
let image0 = images.add(image.clone());
|
||||
|
Loading…
Reference in New Issue
Block a user