use texture array instead of atlas for tiles

This commit is contained in:
2016-10-06 18:20:08 -07:00
parent 931bc1b0a8
commit 0275d01b96
3 changed files with 15 additions and 12 deletions

View File

@@ -52,7 +52,7 @@ gfx_defines! {
trans: gfx::ConstantBuffer<::view::Trans> = "b_trans",
constants: gfx::ConstantBuffer<Constants> = "b_constants",
locals: gfx::ConstantBuffer<Locals> = "b_locals",
atlas: gfx::TextureSampler<[f32; 4]> = "t_atlas",
atlas: gfx::TextureSampler<[f32; 4]> = "t_tiles",
pixcolor: gfx::RenderTarget<::view::ColorFormat> = "pixcolor",
depth: gfx::DepthTarget<::view::DepthFormat> = gfx::preset::depth::LESS_EQUAL_WRITE,
}
@@ -157,7 +157,7 @@ impl<D: gfx::Device, F: gfx::Factory<D::Resources>> WorldScene<D, F> {
locals: factory.create_constant_buffer(1),
atlas: tile::get_tiles::<_, _, view::ColorFormat>(factory),
sampler: factory.create_sampler(tex::SamplerInfo::new(tex::FilterMethod::Scale,
tex::WrapMode::Clamp)),
tex::WrapMode::Tile)),
f: PhantomData,
vbuf: vertex_buffer,