rename to fullscreen
This commit is contained in:
+18
-15
@@ -200,7 +200,7 @@ struct App {
|
|||||||
struct ShaderModules {
|
struct ShaderModules {
|
||||||
implicit_vs: Arc<ShaderModule>,
|
implicit_vs: Arc<ShaderModule>,
|
||||||
implicit_fs: Arc<ShaderModule>,
|
implicit_fs: Arc<ShaderModule>,
|
||||||
lighting_vs: Arc<ShaderModule>,
|
fullscreen_vs: Arc<ShaderModule>,
|
||||||
lighting_fs: Arc<ShaderModule>,
|
lighting_fs: Arc<ShaderModule>,
|
||||||
normals_fs: Arc<ShaderModule>,
|
normals_fs: Arc<ShaderModule>,
|
||||||
}
|
}
|
||||||
@@ -599,10 +599,10 @@ mod implicit_vs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mod lighting_vs {
|
mod fullscreen_vs {
|
||||||
vulkano_shaders::shader! {
|
vulkano_shaders::shader! {
|
||||||
ty: "vertex",
|
ty: "vertex",
|
||||||
path: "src/lighting.vert.glsl",
|
path: "src/fullscreen.vert.glsl",
|
||||||
vulkan_version: "1.3",
|
vulkan_version: "1.3",
|
||||||
spirv_version: "1.6",
|
spirv_version: "1.6",
|
||||||
custom_derives: [Debug, Clone, Copy],
|
custom_derives: [Debug, Clone, Copy],
|
||||||
@@ -712,7 +712,7 @@ impl ApplicationHandler for App {
|
|||||||
::std::sync::Arc<::vulkano::shader::ShaderModule>,
|
::std::sync::Arc<::vulkano::shader::ShaderModule>,
|
||||||
::vulkano::Validated<::vulkano::VulkanError>,
|
::vulkano::Validated<::vulkano::VulkanError>,
|
||||||
>),
|
>),
|
||||||
((lighting_vs::load)
|
((fullscreen_vs::load)
|
||||||
as fn(
|
as fn(
|
||||||
::std::sync::Arc<::vulkano::device::Device>,
|
::std::sync::Arc<::vulkano::device::Device>,
|
||||||
) -> Result<
|
) -> Result<
|
||||||
@@ -794,7 +794,7 @@ impl ApplicationHandler for App {
|
|||||||
let shader_modules = ShaderModules {
|
let shader_modules = ShaderModules {
|
||||||
implicit_vs: pariter[0].clone(),
|
implicit_vs: pariter[0].clone(),
|
||||||
implicit_fs: trace_module,
|
implicit_fs: trace_module,
|
||||||
lighting_vs: pariter[1].clone(),
|
fullscreen_vs: pariter[1].clone(),
|
||||||
lighting_fs: pariter[2].clone(),
|
lighting_fs: pariter[2].clone(),
|
||||||
normals_fs: normals_module,
|
normals_fs: normals_module,
|
||||||
};
|
};
|
||||||
@@ -1758,8 +1758,8 @@ fn deferred_pipeline_recompile(
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
let lighting_vs_entry = shader_modules
|
let fullscreen_vs_entry = shader_modules
|
||||||
.lighting_vs
|
.fullscreen_vs
|
||||||
.specialize(specs.clone())
|
.specialize(specs.clone())
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.single_entry_point()
|
.single_entry_point()
|
||||||
@@ -1767,7 +1767,7 @@ fn deferred_pipeline_recompile(
|
|||||||
|
|
||||||
let vertex_input_state = VertexInputState::new();
|
let vertex_input_state = VertexInputState::new();
|
||||||
|
|
||||||
let lighting_vs_info = PipelineShaderStageCreateInfo::new(lighting_vs_entry);
|
let fullscreen_vs_info = PipelineShaderStageCreateInfo::new(fullscreen_vs_entry);
|
||||||
let normals_fs_info = PipelineShaderStageCreateInfo::new(
|
let normals_fs_info = PipelineShaderStageCreateInfo::new(
|
||||||
shader_modules
|
shader_modules
|
||||||
.normals_fs
|
.normals_fs
|
||||||
@@ -1779,13 +1779,13 @@ fn deferred_pipeline_recompile(
|
|||||||
|
|
||||||
let layout = PipelineLayout::new(
|
let layout = PipelineLayout::new(
|
||||||
device.clone(),
|
device.clone(),
|
||||||
PipelineDescriptorSetLayoutCreateInfo::from_stages([&lighting_vs_info, &normals_fs_info])
|
PipelineDescriptorSetLayoutCreateInfo::from_stages([&fullscreen_vs_info, &normals_fs_info])
|
||||||
.into_pipeline_layout_create_info(device.clone())
|
.into_pipeline_layout_create_info(device.clone())
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let stages = [lighting_vs_info, normals_fs_info].into_iter().collect();
|
let stages = [fullscreen_vs_info, normals_fs_info].into_iter().collect();
|
||||||
let normals_subpass = Subpass::from(render_pass.clone(), 1).unwrap();
|
let normals_subpass = Subpass::from(render_pass.clone(), 1).unwrap();
|
||||||
|
|
||||||
let normals_pipeline = {
|
let normals_pipeline = {
|
||||||
@@ -1818,8 +1818,8 @@ fn deferred_pipeline_recompile(
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
};
|
};
|
||||||
|
|
||||||
let lighting_vs_entry = shader_modules
|
let fullscreen_vs_entry = shader_modules
|
||||||
.lighting_vs
|
.fullscreen_vs
|
||||||
.specialize(specs.clone())
|
.specialize(specs.clone())
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.single_entry_point()
|
.single_entry_point()
|
||||||
@@ -1827,7 +1827,7 @@ fn deferred_pipeline_recompile(
|
|||||||
|
|
||||||
let vertex_input_state = VertexInputState::new();
|
let vertex_input_state = VertexInputState::new();
|
||||||
|
|
||||||
let lighting_vs_info = PipelineShaderStageCreateInfo::new(lighting_vs_entry);
|
let fullscreen_vs_info = PipelineShaderStageCreateInfo::new(fullscreen_vs_entry);
|
||||||
let lighting_fs_info = PipelineShaderStageCreateInfo::new(
|
let lighting_fs_info = PipelineShaderStageCreateInfo::new(
|
||||||
shader_modules
|
shader_modules
|
||||||
.lighting_fs
|
.lighting_fs
|
||||||
@@ -1839,13 +1839,16 @@ fn deferred_pipeline_recompile(
|
|||||||
|
|
||||||
let layout = PipelineLayout::new(
|
let layout = PipelineLayout::new(
|
||||||
device.clone(),
|
device.clone(),
|
||||||
PipelineDescriptorSetLayoutCreateInfo::from_stages([&lighting_vs_info, &lighting_fs_info])
|
PipelineDescriptorSetLayoutCreateInfo::from_stages([
|
||||||
|
&fullscreen_vs_info,
|
||||||
|
&lighting_fs_info,
|
||||||
|
])
|
||||||
.into_pipeline_layout_create_info(device.clone())
|
.into_pipeline_layout_create_info(device.clone())
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let stages = [lighting_vs_info, lighting_fs_info].into_iter().collect();
|
let stages = [fullscreen_vs_info, lighting_fs_info].into_iter().collect();
|
||||||
let lighting_subpass = Subpass::from(render_pass.clone(), 2).unwrap();
|
let lighting_subpass = Subpass::from(render_pass.clone(), 2).unwrap();
|
||||||
|
|
||||||
let lighting_pipeline = {
|
let lighting_pipeline = {
|
||||||
|
|||||||
Reference in New Issue
Block a user