biome mapping
This commit is contained in:
18
game/main/src/shader_extensions/chunk_material.rs
Normal file
18
game/main/src/shader_extensions/chunk_material.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use bevy::asset::{Asset, Handle};
|
||||
use bevy::pbr::MaterialExtension;
|
||||
use bevy::reflect::TypePath;
|
||||
use bevy::render::render_resource::{AsBindGroup, ShaderRef};
|
||||
use bevy::render::texture::Image;
|
||||
|
||||
#[derive(Asset, TypePath, AsBindGroup, Debug, Clone)]
|
||||
pub struct ChunkMaterial {
|
||||
#[texture(100, dimension = "2d_array")]
|
||||
#[sampler(101)]
|
||||
pub array_texture: Handle<Image>,
|
||||
}
|
||||
|
||||
impl MaterialExtension for ChunkMaterial {
|
||||
fn fragment_shader() -> ShaderRef {
|
||||
"shaders/world/chunk.wgsl".into()
|
||||
}
|
||||
}
|
||||
1
game/main/src/shader_extensions/mod.rs
Normal file
1
game/main/src/shader_extensions/mod.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod chunk_material;
|
||||
Reference in New Issue
Block a user