diff --git a/assets/shaders/game_of_life.wgsl b/assets/shaders/game_of_life.wgsl index 22305b31971f5..d47b618a0cc7b 100644 --- a/assets/shaders/game_of_life.wgsl +++ b/assets/shaders/game_of_life.wgsl @@ -1,4 +1,4 @@ -@group(0) @binding(0) var texture: texture_storage_2d; +@group(0) @binding(0) var texture: texture_storage_2d; fn hash(value: u32) -> u32 { var state = value; diff --git a/examples/shader/compute_shader_game_of_life.rs b/examples/shader/compute_shader_game_of_life.rs index ebd00c3894d22..267bc05e71bd3 100644 --- a/examples/shader/compute_shader_game_of_life.rs +++ b/examples/shader/compute_shader_game_of_life.rs @@ -48,7 +48,7 @@ fn setup(mut commands: Commands, mut images: ResMut>) { }, TextureDimension::D2, &[0, 0, 0, 255], - TextureFormat::Rgba8Unorm, + TextureFormat::R32Float, RenderAssetUsages::RENDER_WORLD, ); image.texture_descriptor.usage = @@ -97,7 +97,7 @@ impl Plugin for GameOfLifeComputePlugin { #[derive(Resource, Clone, Deref, ExtractResource, AsBindGroup)] struct GameOfLifeImage { - #[storage_texture(0, image_format = Rgba8Unorm, access = ReadWrite)] + #[storage_texture(0, image_format = R32Float, access = ReadWrite)] texture: Handle, }