Skip to content
Snippets Groups Projects
Commit e74f7413 authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

Merge branch '77-lens-flares' into 'develop'

Resolve "Lens Flares"

Closes #77

See merge request !62
parents 09fd98e2 87c3435b
No related branches found
No related tags found
1 merge request!62Resolve "Lens Flares"
Pipeline #26061 failed
Showing
with 90 additions and 6 deletions
......@@ -4,9 +4,12 @@
namespace vkcv {
struct SampledImageDescriptorWrite {
inline SampledImageDescriptorWrite(uint32_t binding, ImageHandle image) : binding(binding), image(image) {};
inline SampledImageDescriptorWrite(uint32_t binding, ImageHandle image, uint32_t mipLevel = 0, bool useGeneralLayout = false)
: binding(binding), image(image), mipLevel(mipLevel), useGeneralLayout(useGeneralLayout) {};
uint32_t binding;
ImageHandle image;
uint32_t mipLevel;
bool useGeneralLayout;
};
struct StorageImageDescriptorWrite {
......@@ -38,8 +41,8 @@ namespace vkcv {
struct DescriptorWrites {
std::vector<SampledImageDescriptorWrite> sampledImageWrites;
std::vector<StorageImageDescriptorWrite> storageImageWrites;
std::vector<UniformBufferDescriptorWrite> uniformBufferWrites;
std::vector<StorageBufferDescriptorWrite> storageBufferWrites;
std::vector<SamplerDescriptorWrite> samplerWrites;
std::vector<UniformBufferDescriptorWrite> uniformBufferWrites;
std::vector<StorageBufferDescriptorWrite> storageBufferWrites;
std::vector<SamplerDescriptorWrite> samplerWrites;
};
}
\ No newline at end of file
......@@ -42,8 +42,10 @@ namespace vkcv {
void generateMipChainImmediate();
void recordMipChainGeneration(const vkcv::CommandStreamHandle& cmdStream);
private:
ImageManager* const m_manager;
const ImageHandle m_handle;
// TODO: const qualifier removed, very hacky!!!
// Else you cannot recreate an image. Pls fix.
ImageManager* m_manager;
ImageHandle m_handle;
Image(ImageManager* manager, const ImageHandle& handle);
......
# Add new projects/examples here:
add_subdirectory(bloom)
add_subdirectory(first_triangle)
add_subdirectory(first_mesh)
add_subdirectory(first_scene)
......
bloom
\ No newline at end of file
cmake_minimum_required(VERSION 3.16)
project(bloom)
# setting c++ standard for the project
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# this should fix the execution path to load local files from the project
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# adding source files to the project
add_executable(bloom src/main.cpp)
target_sources(bloom PRIVATE
src/BloomAndFlares.cpp
src/BloomAndFlares.hpp)
# this should fix the execution path to load local files from the project (for MSVC)
if(MSVC)
set_target_properties(bloom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_target_properties(bloom PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# in addition to setting the output directory, the working directory has to be set
# by default visual studio sets the working directory to the build directory, when using the debugger
set_target_properties(bloom PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
# including headers of dependencies and the VkCV framework
target_include_directories(bloom SYSTEM BEFORE PRIVATE ${vkcv_include} ${vkcv_includes} ${vkcv_asset_loader_include} ${vkcv_camera_include} ${vkcv_shader_compiler_include})
# linking with libraries from all dependencies and the VkCV framework
target_link_libraries(bloom vkcv ${vkcv_libraries} vkcv_asset_loader ${vkcv_asset_loader_libraries} vkcv_camera vkcv_shader_compiler)
File added
Source diff could not be displayed: it is stored in LFS. Options to address this: view the blob.
projects/bloom/resources/Sponza/background.png

132 B

projects/bloom/resources/Sponza/chain_texture.png

131 B

projects/bloom/resources/Sponza/lion.png

132 B

projects/bloom/resources/Sponza/spnza_bricks_a_diff.png

132 B

projects/bloom/resources/Sponza/sponza_arch_diff.png

132 B

projects/bloom/resources/Sponza/sponza_ceiling_a_diff.png

132 B

projects/bloom/resources/Sponza/sponza_column_a_diff.png

132 B

projects/bloom/resources/Sponza/sponza_column_b_diff.png

132 B

projects/bloom/resources/Sponza/sponza_column_c_diff.png

132 B

projects/bloom/resources/Sponza/sponza_curtain_blue_diff.png

132 B

projects/bloom/resources/Sponza/sponza_curtain_diff.png

132 B

projects/bloom/resources/Sponza/sponza_curtain_green_diff.png

132 B

projects/bloom/resources/Sponza/sponza_details_diff.png

132 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment