rename to fullscreen

This commit is contained in:
2025-07-01 20:39:46 +01:00
parent 28ae452866
commit 7ecceb943d
2 changed files with 28 additions and 25 deletions
+28 -25
View File
@@ -198,11 +198,11 @@ struct App {
}
struct ShaderModules {
implicit_vs: Arc<ShaderModule>,
implicit_fs: Arc<ShaderModule>,
lighting_vs: Arc<ShaderModule>,
lighting_fs: Arc<ShaderModule>,
normals_fs: Arc<ShaderModule>,
implicit_vs: Arc<ShaderModule>,
implicit_fs: Arc<ShaderModule>,
fullscreen_vs: Arc<ShaderModule>,
lighting_fs: Arc<ShaderModule>,
normals_fs: Arc<ShaderModule>,
}
struct RenderContext {
@@ -599,10 +599,10 @@ mod implicit_vs {
}
}
mod lighting_vs {
mod fullscreen_vs {
vulkano_shaders::shader! {
ty: "vertex",
path: "src/lighting.vert.glsl",
path: "src/fullscreen.vert.glsl",
vulkan_version: "1.3",
spirv_version: "1.6",
custom_derives: [Debug, Clone, Copy],
@@ -712,7 +712,7 @@ impl ApplicationHandler for App {
::std::sync::Arc<::vulkano::shader::ShaderModule>,
::vulkano::Validated<::vulkano::VulkanError>,
>),
((lighting_vs::load)
((fullscreen_vs::load)
as fn(
::std::sync::Arc<::vulkano::device::Device>,
) -> Result<
@@ -792,11 +792,11 @@ impl ApplicationHandler for App {
};
let shader_modules = ShaderModules {
implicit_vs: pariter[0].clone(),
implicit_fs: trace_module,
lighting_vs: pariter[1].clone(),
lighting_fs: pariter[2].clone(),
normals_fs: normals_module,
implicit_vs: pariter[0].clone(),
implicit_fs: trace_module,
fullscreen_vs: pariter[1].clone(),
lighting_fs: pariter[2].clone(),
normals_fs: normals_module,
};
drop(pariter);
@@ -1758,8 +1758,8 @@ fn deferred_pipeline_recompile(
.unwrap()
};
let lighting_vs_entry = shader_modules
.lighting_vs
let fullscreen_vs_entry = shader_modules
.fullscreen_vs
.specialize(specs.clone())
.unwrap()
.single_entry_point()
@@ -1767,7 +1767,7 @@ fn deferred_pipeline_recompile(
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(
shader_modules
.normals_fs
@@ -1779,13 +1779,13 @@ fn deferred_pipeline_recompile(
let layout = PipelineLayout::new(
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())
.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_pipeline = {
@@ -1818,8 +1818,8 @@ fn deferred_pipeline_recompile(
.unwrap()
};
let lighting_vs_entry = shader_modules
.lighting_vs
let fullscreen_vs_entry = shader_modules
.fullscreen_vs
.specialize(specs.clone())
.unwrap()
.single_entry_point()
@@ -1827,7 +1827,7 @@ fn deferred_pipeline_recompile(
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(
shader_modules
.lighting_fs
@@ -1839,13 +1839,16 @@ fn deferred_pipeline_recompile(
let layout = PipelineLayout::new(
device.clone(),
PipelineDescriptorSetLayoutCreateInfo::from_stages([&lighting_vs_info, &lighting_fs_info])
.into_pipeline_layout_create_info(device.clone())
.unwrap(),
PipelineDescriptorSetLayoutCreateInfo::from_stages([
&fullscreen_vs_info,
&lighting_fs_info,
])
.into_pipeline_layout_create_info(device.clone())
.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_pipeline = {