From aa6071a948942b2285957a593fbe49f8fdb972e2 Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Wed, 11 Oct 2023 18:50:06 +0800 Subject: [PATCH] added newly files and adjust comments. --- example/CMakeLists.txt | 1 + example/LightBasic/BlinnPhongDirectionLight.cpp | 0 example/LightBasic/CMakeLists.txt | 13 +++++++++++++ src/ShaderGen/MaterialFileData.h | 6 +++--- src/ShaderGen/common/light/MFPhong.h | 8 ++++++++ 5 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 example/LightBasic/BlinnPhongDirectionLight.cpp create mode 100644 example/LightBasic/CMakeLists.txt create mode 100644 src/ShaderGen/common/light/MFPhong.h diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 5a419ee9..d9add269 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -4,6 +4,7 @@ SET(VULKAN_APP_FRAMEWORK ${CMAKE_CURRENT_SOURCE_DIR}/common/VulkanAppFramework.h add_subdirectory(Basic) add_subdirectory(Texture) +add_subdirectory(LightBasic) add_subdirectory(Gizmo) add_subdirectory(Vulkan) diff --git a/example/LightBasic/BlinnPhongDirectionLight.cpp b/example/LightBasic/BlinnPhongDirectionLight.cpp new file mode 100644 index 00000000..e69de29b diff --git a/example/LightBasic/CMakeLists.txt b/example/LightBasic/CMakeLists.txt new file mode 100644 index 00000000..568e8903 --- /dev/null +++ b/example/LightBasic/CMakeLists.txt @@ -0,0 +1,13 @@ +macro(CreateProject name) + add_executable(${name} ${ARGN} ${VULKAN_APP_FRAMEWORK}) + target_link_libraries(${name} ${ULRE}) + + IF(MSVC) + set_target_properties(${name} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY ${ULRE_RUNTIME_PATH}) + set_property(TARGET ${name} PROPERTY VS_DPI_AWARE "PerMonitor") + ENDIF() + + set_property(TARGET ${name} PROPERTY FOLDER "ULRE/Example/Light Basic") +endmacro() + +CreateProject(01_BlinnPhongDirectionLight BlinnPhongDirectionLight.cpp) diff --git a/src/ShaderGen/MaterialFileData.h b/src/ShaderGen/MaterialFileData.h index 00e65986..adaa5f91 100644 --- a/src/ShaderGen/MaterialFileData.h +++ b/src/ShaderGen/MaterialFileData.h @@ -84,12 +84,12 @@ namespace material_file public: - AnsiStringList require_list; ///<需求的内部模块(如LocalToWorld,Sun,Shadow等系统内置元素) -// AnsiStringList import_list; ///<引用的外部模块 + AnsiStringList require_list; ///<需求的内部模块(如LocalToWorld,Sun,Shadow等系统内置元素) +// AnsiStringList import_list; ///<引用的外部模块 MaterialInstanceData mi{}; - List vi; + List vi; /// + +STD_MTL_FUNC_NAMESPACE_BEGIN +constexpr const char* Phong + + STD_MTL_FUNC_NAMESPACE_END