Merge branch 'master' into texture-index

This commit is contained in:
2024-04-27 19:26:45 -04:00
8 changed files with 75 additions and 20 deletions

View File

@@ -25,8 +25,7 @@ impl Plugin for PhosCameraPlugin {
}
}
fn setup(mut commands: Commands, mut msaa: ResMut<Msaa>) {
*msaa = Msaa::Off;
fn setup(mut commands: Commands) {
commands.spawn((
Camera3dBundle {
transform: Transform::from_xyz(0., 30., 0.)

View File

@@ -5,8 +5,7 @@ use bevy_inspector_egui::quick::WorldInspectorPlugin;
mod phos;
mod prelude;
mod shaders;
mod shader_extensions;
use phos::PhosGamePlugin;
fn main() {

View File

@@ -1,5 +1,5 @@
use crate::prelude::*;
use crate::shaders::chunk::ChunkMaterial;
use crate::shader_extensions::chunk_material::ChunkMaterial;
use bevy::asset::LoadState;
use bevy::core_pipeline::experimental::taa::TemporalAntiAliasPlugin;
use bevy::pbr::ExtendedMaterial;
@@ -9,7 +9,7 @@ use bevy_rapier3d::render::RapierDebugRenderPlugin;
use camera_system::PhosCameraPlugin;
use iyes_perf_ui::prelude::*;
use world_generation::biome_painter::{
self, BiomePainterAsset, BiomePainterLoadState, BiomePainterPlugin,
BiomePainterAsset, BiomePainterLoadState, BiomePainterPlugin,
};
use world_generation::hex_utils::offset_to_world;
use world_generation::tile_manager::{TileAsset, TileAssetLoadState, TileAssetPlugin, TileManager};

View 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()
}
}

View File

@@ -0,0 +1 @@
pub mod chunk_material;