Hey! I'm wondering if I'm setting up a tiled texture correctly. I'm using a simple grid image and it's showing up a bit jagged and missing some lines.
I have a comparison image for Bevy versus Godot. I don't really know Godot, I just wanted a comparison point and threw together a similar setup.
Curious if the difference might come from some default settings I should be changing.
Here is the code for making the plane:
fn setup(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<StandardMaterial>>,
asset_server: Res<AssetServer>,
) {
let mesh = Plane3d::new(Vec3::Y, Vec2::splat(10.));
let mesh = meshes.add(mesh);
let base_color_texture =
asset_server.load_with_settings("grid.png", |settings: &mut ImageLoaderSettings| {
settings.sampler = ImageSampler::Descriptor(ImageSamplerDescriptor {
address_mode_u: ImageAddressMode::Repeat,
address_mode_v: ImageAddressMode::Repeat,
..default()
});
});
let material = StandardMaterial {
base_color: Color::srgb_u8(158, 192, 219),
base_color_texture: Some(base_color_texture),
uv_transform: Affine2::from_scale(Vec2::splat(20.)),
..default()
};
let material = materials.add(material);
let bundle = MaterialMeshBundle {
mesh,
material,
..default()
};
commands.spawn(bundle);
}