MicropolyBatch doesn't need to satisfy Surface trait.
Eventually the Surface trait will be changed to actually mean the ability to be processed _into_ a MicropolyBatch. So it's ultimately nonsensical for MicropolyBatch to implement it.
This commit is contained in:
parent
112f94c127
commit
764bdbeb06
|
@ -9,10 +9,10 @@ use crate::{
|
||||||
lerp::lerp_slice,
|
lerp::lerp_slice,
|
||||||
math::{cross, dot, Matrix4x4, Normal, Point},
|
math::{cross, dot, Matrix4x4, Normal, Point},
|
||||||
ray::{AccelRay, Ray},
|
ray::{AccelRay, Ray},
|
||||||
shading::{surface_closure::SurfaceClosure, SurfaceShader},
|
shading::surface_closure::SurfaceClosure,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{triangle, Surface, SurfaceIntersection, SurfaceIntersectionData};
|
use super::{triangle, SurfaceIntersection, SurfaceIntersectionData};
|
||||||
|
|
||||||
/// This is the core surface primitive for rendering: all surfaces are
|
/// This is the core surface primitive for rendering: all surfaces are
|
||||||
/// ultimately processed into pre-shaded micropolygon batches for rendering.
|
/// ultimately processed into pre-shaded micropolygon batches for rendering.
|
||||||
|
@ -96,19 +96,12 @@ impl<'a> MicropolyBatch<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Boundable for MicropolyBatch<'a> {
|
impl<'a> MicropolyBatch<'a> {
|
||||||
fn bounds(&self) -> &[BBox] {
|
|
||||||
self.accel.bounds()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'a> Surface for MicropolyBatch<'a> {
|
|
||||||
fn intersect_rays(
|
fn intersect_rays(
|
||||||
&self,
|
&self,
|
||||||
accel_rays: &mut [AccelRay],
|
accel_rays: &mut [AccelRay],
|
||||||
wrays: &[Ray],
|
wrays: &[Ray],
|
||||||
isects: &mut [SurfaceIntersection],
|
isects: &mut [SurfaceIntersection],
|
||||||
_shader: &SurfaceShader,
|
|
||||||
space: &[Matrix4x4],
|
space: &[Matrix4x4],
|
||||||
) {
|
) {
|
||||||
// Precalculate transform for non-motion blur cases
|
// Precalculate transform for non-motion blur cases
|
||||||
|
@ -260,3 +253,9 @@ impl<'a> Surface for MicropolyBatch<'a> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> Boundable for MicropolyBatch<'a> {
|
||||||
|
fn bounds(&self) -> &[BBox] {
|
||||||
|
self.accel.bounds()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user