better lighting
This commit is contained in:
parent
805a2713a3
commit
6ed4e17065
75 changed files with 6417 additions and 3667 deletions
|
|
@ -4,6 +4,7 @@ pub mod stream;
|
|||
|
||||
use crate::bsp::Bsp;
|
||||
use crate::math::Vec3;
|
||||
use crate::pxl8::pxl8_vxl_trace;
|
||||
use crate::voxel::VoxelChunk;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug)]
|
||||
|
|
@ -35,7 +36,9 @@ impl Chunk {
|
|||
pub fn trace(&self, from: Vec3, to: Vec3, radius: f32) -> Vec3 {
|
||||
match self {
|
||||
Chunk::Bsp { bsp, .. } => bsp.trace(from, to, radius),
|
||||
Chunk::Vxl { data, .. } => data.trace(from, to, radius),
|
||||
Chunk::Vxl { cx, cy, cz, data, .. } => unsafe {
|
||||
pxl8_vxl_trace(data.chunk, *cx, *cy, *cz, from, to, radius)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue