mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Update changelog
This commit is contained in:
parent
5acfe44cbb
commit
5ba4d26821
@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Power stat to weapons which affects weapon damage
|
- Power stat to weapons which affects weapon damage
|
||||||
- Add detection of entities under the cursor
|
- Add detection of entities under the cursor
|
||||||
- Functional group-system with exp-sharing and disabled damage to group members
|
- Functional group-system with exp-sharing and disabled damage to group members
|
||||||
|
- Some Campfire, fireball & bomb; particle, light & sound effects.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@ use super::SysTimer;
|
|||||||
use common::{
|
use common::{
|
||||||
comp::{
|
comp::{
|
||||||
Alignment, Body, CanBuild, CharacterState, Collider, Energy, Gravity, Item, LightEmitter,
|
Alignment, Body, CanBuild, CharacterState, Collider, Energy, Gravity, Item, LightEmitter,
|
||||||
Loadout, Mass, MountState, Mounting, Ori, Player, Pos,
|
Loadout, Mass, MountState, Mounting, Ori, Player, Pos, Scale, Stats, Sticky, Vel,
|
||||||
Scale, Stats, Sticky, Vel,
|
|
||||||
},
|
},
|
||||||
msg::EcsCompPacket,
|
msg::EcsCompPacket,
|
||||||
sync::{CompSyncPackage, EntityPackage, EntitySyncPackage, Uid, UpdateTracker, WorldSyncExt},
|
sync::{CompSyncPackage, EntityPackage, EntitySyncPackage, Uid, UpdateTracker, WorldSyncExt},
|
||||||
|
@ -18,11 +18,11 @@ pub use self::{
|
|||||||
pipelines::{
|
pipelines::{
|
||||||
figure::{BoneData as FigureBoneData, FigurePipeline, Locals as FigureLocals},
|
figure::{BoneData as FigureBoneData, FigurePipeline, Locals as FigureLocals},
|
||||||
fluid::FluidPipeline,
|
fluid::FluidPipeline,
|
||||||
|
particle::{Instance as ParticleInstance, ParticlePipeline},
|
||||||
postprocess::{
|
postprocess::{
|
||||||
create_mesh as create_pp_mesh, Locals as PostProcessLocals, PostProcessPipeline,
|
create_mesh as create_pp_mesh, Locals as PostProcessLocals, PostProcessPipeline,
|
||||||
},
|
},
|
||||||
skybox::{create_mesh as create_skybox_mesh, Locals as SkyboxLocals, SkyboxPipeline},
|
skybox::{create_mesh as create_skybox_mesh, Locals as SkyboxLocals, SkyboxPipeline},
|
||||||
particle::{Instance as ParticleInstance, ParticlePipeline},
|
|
||||||
sprite::{Instance as SpriteInstance, SpritePipeline},
|
sprite::{Instance as SpriteInstance, SpritePipeline},
|
||||||
terrain::{Locals as TerrainLocals, TerrainPipeline},
|
terrain::{Locals as TerrainLocals, TerrainPipeline},
|
||||||
ui::{
|
ui::{
|
||||||
|
@ -4,7 +4,9 @@ use super::{
|
|||||||
instances::Instances,
|
instances::Instances,
|
||||||
mesh::Mesh,
|
mesh::Mesh,
|
||||||
model::{DynamicModel, Model},
|
model::{DynamicModel, Model},
|
||||||
pipelines::{figure, fluid, postprocess, skybox, sprite, particle, terrain, ui, Globals, Light, Shadow},
|
pipelines::{
|
||||||
|
figure, fluid, particle, postprocess, skybox, sprite, terrain, ui, Globals, Light, Shadow,
|
||||||
|
},
|
||||||
texture::Texture,
|
texture::Texture,
|
||||||
AaMode, CloudMode, FluidMode, Pipeline, RenderError,
|
AaMode, CloudMode, FluidMode, Pipeline, RenderError,
|
||||||
};
|
};
|
||||||
@ -951,17 +953,17 @@ fn create_pipelines(
|
|||||||
gfx::state::CullFace::Back,
|
gfx::state::CullFace::Back,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
// Construct a pipeline for rendering particles
|
// Construct a pipeline for rendering particles
|
||||||
let particle_pipeline = create_pipeline(
|
let particle_pipeline = create_pipeline(
|
||||||
factory,
|
factory,
|
||||||
particle::pipe::new(),
|
particle::pipe::new(),
|
||||||
&assets::load_watched::<String>("voxygen.shaders.particle-vert", shader_reload_indicator)
|
&assets::load_watched::<String>("voxygen.shaders.particle-vert", shader_reload_indicator)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
&assets::load_watched::<String>("voxygen.shaders.particle-frag", shader_reload_indicator)
|
&assets::load_watched::<String>("voxygen.shaders.particle-frag", shader_reload_indicator)
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
&include_ctx,
|
&include_ctx,
|
||||||
gfx::state::CullFace::Back,
|
gfx::state::CullFace::Back,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
// Construct a pipeline for rendering UI elements
|
// Construct a pipeline for rendering UI elements
|
||||||
let ui_pipeline = create_pipeline(
|
let ui_pipeline = create_pipeline(
|
||||||
|
@ -34,35 +34,10 @@ const MODEL_KEY: &str = "voxygen.voxel.particle";
|
|||||||
|
|
||||||
impl ParticleMgr {
|
impl ParticleMgr {
|
||||||
pub fn new(renderer: &mut Renderer) -> Self {
|
pub fn new(renderer: &mut Renderer) -> Self {
|
||||||
let mut model_cache = HashMap::new();
|
|
||||||
|
|
||||||
model_cache.entry(MODEL_KEY).or_insert_with(|| {
|
|
||||||
let offset = Vec3::zero();
|
|
||||||
let lod_scale = Vec3::one();
|
|
||||||
|
|
||||||
let vox = assets::load_expect::<DotVoxData>(MODEL_KEY);
|
|
||||||
|
|
||||||
let mesh = &Meshable::<ParticlePipeline, ParticlePipeline>::generate_mesh(
|
|
||||||
&Segment::from(vox.as_ref()),
|
|
||||||
(offset * lod_scale, Vec3::one() / lod_scale),
|
|
||||||
)
|
|
||||||
.0;
|
|
||||||
|
|
||||||
renderer
|
|
||||||
.create_model(mesh)
|
|
||||||
.expect("Failed to create particle model");
|
|
||||||
});
|
|
||||||
|
|
||||||
let insts = Vec::new();
|
|
||||||
|
|
||||||
let instances = renderer
|
|
||||||
.create_instances(&insts)
|
|
||||||
.expect("Failed to upload particle instances to the GPU!");
|
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
particles: Vec::new(),
|
particles: Vec::new(),
|
||||||
instances,
|
instances: default_instances(renderer),
|
||||||
model_cache,
|
model_cache: default_cache(renderer),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,3 +245,34 @@ impl ParticleMgr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn default_instances(renderer: &mut Renderer) -> Instances<ParticleInstance> {
|
||||||
|
let empty_vec = Vec::new();
|
||||||
|
|
||||||
|
renderer
|
||||||
|
.create_instances(&empty_vec)
|
||||||
|
.expect("Failed to upload particle instances to the GPU!")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn default_cache(renderer: &mut Renderer) -> HashMap<&'static str, Model<ParticlePipeline>> {
|
||||||
|
let mut model_cache = HashMap::new();
|
||||||
|
|
||||||
|
model_cache.entry(MODEL_KEY).or_insert_with(|| {
|
||||||
|
let offset = Vec3::zero();
|
||||||
|
let lod_scale = Vec3::one();
|
||||||
|
|
||||||
|
let vox = assets::load_expect::<DotVoxData>(MODEL_KEY);
|
||||||
|
|
||||||
|
let mesh = &Meshable::<ParticlePipeline, ParticlePipeline>::generate_mesh(
|
||||||
|
&Segment::from(vox.as_ref()),
|
||||||
|
(offset * lod_scale, Vec3::one() / lod_scale),
|
||||||
|
)
|
||||||
|
.0;
|
||||||
|
|
||||||
|
renderer
|
||||||
|
.create_model(mesh)
|
||||||
|
.expect("Failed to create particle model")
|
||||||
|
});
|
||||||
|
|
||||||
|
model_cache
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user