|
|
|
@ -3,9 +3,7 @@ use core::slice;
|
|
|
|
|
use gpu_allocator::MemoryLocation;
|
|
|
|
|
use kea_gpu::{
|
|
|
|
|
commands::{CommandBuffer, CommandBufferRecorder},
|
|
|
|
|
descriptors::DescriptorSetLayout,
|
|
|
|
|
device::Device,
|
|
|
|
|
pipelines::PipelineLayout,
|
|
|
|
|
shaders::ShaderGroups,
|
|
|
|
|
slots::{SlotBindings, SlotLayout},
|
|
|
|
|
storage::images::{Image, ImageView},
|
|
|
|
@ -25,10 +23,6 @@ pub struct RayTracingPipeline {
|
|
|
|
|
impl RayTracingPipeline {
|
|
|
|
|
pub fn new(kea: &Kea, scene: &Scene) -> Self {
|
|
|
|
|
let slot_layout = SlotLayout::new(kea_renderer_shaders::SLOTS.to_vec());
|
|
|
|
|
let bindings = slot_layout.bindings();
|
|
|
|
|
|
|
|
|
|
let descriptor_set_layout = DescriptorSetLayout::new(kea.device().clone(), &bindings);
|
|
|
|
|
let pipeline_layout = PipelineLayout::new(kea.device().clone(), descriptor_set_layout);
|
|
|
|
|
|
|
|
|
|
let shader_groups = ShaderGroups::new(kea_renderer_shaders::SHADERS.to_vec());
|
|
|
|
|
let pipeline_shaders = shader_groups.build(kea.device().clone(), "./kea_renderer_shaders");
|
|
|
|
@ -37,7 +31,6 @@ impl RayTracingPipeline {
|
|
|
|
|
kea.device().clone(),
|
|
|
|
|
shader_groups,
|
|
|
|
|
pipeline_shaders,
|
|
|
|
|
pipeline_layout,
|
|
|
|
|
slot_layout,
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|