Browse Source

Fixed MaterialUBO memory alignment. All variables are now correctly aligned and read in the shader.

Jef Belmans 2 years ago
parent
commit
cb6c930873

+ 35 - 27
.idea/workspace.xml

@@ -33,13 +33,15 @@
   <component name="ChangeListManager">
     <list default="true" id="e2ea9cb6-a6b7-419f-9266-e5263673b6e6" name="Changes" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/assets/materials/sponza.mtl" beforeDir="false" afterPath="$PROJECT_DIR$/assets/materials/sponza.mtl" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/build/debug/CMakeCache.txt" beforeDir="false" afterPath="$PROJECT_DIR$/build/debug/CMakeCache.txt" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/build/debug/third_party/GLFW/src/cmake_install.cmake" beforeDir="false" afterPath="$PROJECT_DIR$/build/debug/third_party/GLFW/src/cmake_install.cmake" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/build/release/Testing/Temporary/LastTest.log" beforeDir="false" afterPath="$PROJECT_DIR$/build/release/Testing/Temporary/LastTest.log" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/coral_renderer/coral_buffer.h" beforeDir="false" afterPath="$PROJECT_DIR$/coral_renderer/coral_buffer.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/build/release/third_party/GLFW/src/cmake_install.cmake" beforeDir="false" afterPath="$PROJECT_DIR$/build/release/third_party/GLFW/src/cmake_install.cmake" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/coral_renderer/coral_material.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/coral_renderer/coral_material.cpp" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/coral_renderer/coral_material.h" beforeDir="false" afterPath="$PROJECT_DIR$/coral_renderer/coral_material.h" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/coral_renderer/first_app.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/coral_renderer/first_app.cpp" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/coral_renderer/vk_initializers.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/coral_renderer/vk_initializers.cpp" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/coral_renderer/vk_initializers.h" beforeDir="false" afterPath="$PROJECT_DIR$/coral_renderer/vk_initializers.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/coral_renderer/coral_texture.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/coral_renderer/coral_texture.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/coral_renderer/render_system.h" beforeDir="false" afterPath="$PROJECT_DIR$/coral_renderer/render_system.h" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/coral_renderer/vk_types.h" beforeDir="false" afterPath="$PROJECT_DIR$/coral_renderer/vk_types.h" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/shaders/compiled/simple_shader.frag.spv" beforeDir="false" afterPath="$PROJECT_DIR$/shaders/compiled/simple_shader.frag.spv" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/shaders/simple_shader.frag" beforeDir="false" afterPath="$PROJECT_DIR$/shaders/simple_shader.frag" afterDir="false" />
@@ -96,31 +98,36 @@
     <option name="hideEmptyMiddlePackages" value="true" />
     <option name="showLibraryContents" value="true" />
   </component>
-  <component name="PropertiesComponent"><![CDATA[{
-  "keyToString": {
-    "ASKED_ADD_EXTERNAL_FILES": "true",
-    "ASKED_MARK_IGNORED_FILES_AS_EXCLUDED": "true",
-    "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",
-    "RunOnceActivity.OpenProjectViewOnStart": "true",
-    "RunOnceActivity.ShowReadmeOnStart": "true",
-    "RunOnceActivity.cidr.known.project.marker": "true",
-    "SHARE_PROJECT_CONFIGURATION_FILES": "true",
-    "WebServerToolWindowFactoryState": "false",
-    "cf.first.check.clang-format": "false",
-    "cidr.known.project.marker": "true",
-    "git-widget-placeholder": "main",
-    "ignore.virus.scanning.warn.message": "true",
-    "last_opened_file_path": "C:/Game Development/Visual Studio Solutions/Coral3D",
-    "node.js.detected.package.eslint": "true",
-    "node.js.detected.package.tslint": "true",
-    "node.js.selected.package.eslint": "(autodetect)",
-    "node.js.selected.package.tslint": "(autodetect)",
-    "settings.editor.selected.configurable": "it.czerwinski.intellij.wavefront.settings.WavefrontObjSettingsConfigurable",
-    "structure.view.defaults.are.configured": "true",
-    "vue.rearranger.settings.migration": "true"
+  <component name="PropertiesComponent">{
+  &quot;keyToString&quot;: {
+    &quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;,
+    &quot;ASKED_MARK_IGNORED_FILES_AS_EXCLUDED&quot;: &quot;true&quot;,
+    &quot;ASKED_SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
+    &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
+    &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
+    &quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
+    &quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
+    &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
+    &quot;cf.first.check.clang-format&quot;: &quot;false&quot;,
+    &quot;cidr.known.project.marker&quot;: &quot;true&quot;,
+    &quot;git-widget-placeholder&quot;: &quot;main&quot;,
+    &quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;,
+    &quot;last_opened_file_path&quot;: &quot;C:/Game Development/Visual Studio Solutions/Coral3D&quot;,
+    &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
+    &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
+    &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
+    &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
+    &quot;settings.editor.selected.configurable&quot;: &quot;it.czerwinski.intellij.wavefront.settings.WavefrontObjSettingsConfigurable&quot;,
+    &quot;structure.view.defaults.are.configured&quot;: &quot;true&quot;,
+    &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
   }
-}]]></component>
+}</component>
   <component name="RunManager">
+    <configuration default="true" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true">
+      <method v="2">
+        <option name="CLION.EXTERNAL.BUILD" enabled="true" />
+      </method>
+    </configuration>
     <configuration name="coral_renderer" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Coral3D" TARGET_NAME="coral_renderer" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="Coral3D" RUN_TARGET_NAME="coral_renderer">
       <method v="2">
         <option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
@@ -156,6 +163,7 @@
       <workItem from="1694463467367" duration="2649000" />
       <workItem from="1694466268807" duration="3395000" />
       <workItem from="1694542562809" duration="9653000" />
+      <workItem from="1694615302761" duration="3400000" />
     </task>
     <task id="LOCAL-00001" summary="Have I forgotten how to git?">
       <option name="closed" value="true" />

+ 31 - 31
build/debug/CMakeCache.txt

@@ -1,6 +1,6 @@
 # This is the CMakeCache file.
-# For build in directory: c:/Game Development/Visual Studio Solutions/Coral3D/build/debug
-# It was generated by CMake: C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/cmake.exe
+# For build in directory: e:/Game Development/Visual Studio Solutions/Coral3D/build/debug
+# It was generated by CMake: C:/Program Files/JetBrains/CLion 2023.2/bin/cmake/win/x64/bin/cmake.exe
 # You can edit this file to change values found and used by cmake.
 # If you do not want to change any of the values, simply exit the editor.
 # If you do want to change a value, simply edit, save, and exit the editor.
@@ -18,10 +18,10 @@
 BUILD_SHARED_LIBS:BOOL=OFF
 
 //Path to a program.
-CMAKE_ADDR2LINE:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/addr2line.exe
+CMAKE_ADDR2LINE:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/addr2line.exe
 
 //Path to a program.
-CMAKE_AR:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/ar.exe
+CMAKE_AR:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/ar.exe
 
 //Choose the type of build, options are: None Debug Release RelWithDebInfo
 // MinSizeRel ...
@@ -31,15 +31,15 @@ CMAKE_BUILD_TYPE:STRING=Debug
 CMAKE_COLOR_DIAGNOSTICS:BOOL=ON
 
 //CXX compiler
-CMAKE_CXX_COMPILER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/g++.exe
+CMAKE_CXX_COMPILER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/g++.exe
 
 //A wrapper around 'ar' adding the appropriate '--plugin' option
 // for the GCC compiler
-CMAKE_CXX_COMPILER_AR:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/gcc-ar.exe
+CMAKE_CXX_COMPILER_AR:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/gcc-ar.exe
 
 //A wrapper around 'ranlib' adding the appropriate '--plugin' option
 // for the GCC compiler
-CMAKE_CXX_COMPILER_RANLIB:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/gcc-ranlib.exe
+CMAKE_CXX_COMPILER_RANLIB:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/gcc-ranlib.exe
 
 //Flags used by the CXX compiler during all build types.
 CMAKE_CXX_FLAGS:STRING=
@@ -60,15 +60,15 @@ CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
 CMAKE_CXX_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
 
 //C compiler
-CMAKE_C_COMPILER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/gcc.exe
+CMAKE_C_COMPILER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/gcc.exe
 
 //A wrapper around 'ar' adding the appropriate '--plugin' option
 // for the GCC compiler
-CMAKE_C_COMPILER_AR:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/gcc-ar.exe
+CMAKE_C_COMPILER_AR:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/gcc-ar.exe
 
 //A wrapper around 'ranlib' adding the appropriate '--plugin' option
 // for the GCC compiler
-CMAKE_C_COMPILER_RANLIB:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/gcc-ranlib.exe
+CMAKE_C_COMPILER_RANLIB:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/gcc-ranlib.exe
 
 //Flags used by the C compiler during all build types.
 CMAKE_C_FLAGS:STRING=
@@ -89,7 +89,7 @@ CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
 CMAKE_C_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
 
 //Path to a program.
-CMAKE_DLLTOOL:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/dlltool.exe
+CMAKE_DLLTOOL:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/dlltool.exe
 
 //Flags used by the linker during all build types.
 CMAKE_EXE_LINKER_FLAGS:STRING=
@@ -110,7 +110,7 @@ CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
 CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=
 
 //Value Computed by CMake.
-CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=C:/Game Development/Visual Studio Solutions/Coral3D/build/debug/CMakeFiles/pkgRedirects
+CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=E:/Game Development/Visual Studio Solutions/Coral3D/build/debug/CMakeFiles/pkgRedirects
 
 //Convert GNU import libraries to MS format (requires Visual Studio)
 CMAKE_GNUtoMS:BOOL=OFF
@@ -167,10 +167,10 @@ CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com
 CMAKE_INSTALL_SYSCONFDIR:PATH=etc
 
 //Path to a program.
-CMAKE_LINKER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/ld.exe
+CMAKE_LINKER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/ld.exe
 
 //make program
-CMAKE_MAKE_PROGRAM:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/ninja/win/x64/ninja.exe
+CMAKE_MAKE_PROGRAM:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/ninja/win/x64/ninja.exe
 
 //Flags used by the linker during the creation of modules during
 // all build types.
@@ -193,13 +193,13 @@ CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
 CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
 
 //Path to a program.
-CMAKE_NM:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/nm.exe
+CMAKE_NM:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/nm.exe
 
 //Path to a program.
-CMAKE_OBJCOPY:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/objcopy.exe
+CMAKE_OBJCOPY:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/objcopy.exe
 
 //Path to a program.
-CMAKE_OBJDUMP:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/objdump.exe
+CMAKE_OBJDUMP:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/objdump.exe
 
 //Value Computed by CMake
 CMAKE_PROJECT_DESCRIPTION:STATIC=
@@ -226,10 +226,10 @@ CMAKE_PROJECT_VERSION_PATCH:STATIC=1
 CMAKE_PROJECT_VERSION_TWEAK:STATIC=
 
 //Path to a program.
-CMAKE_RANLIB:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/ranlib.exe
+CMAKE_RANLIB:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/ranlib.exe
 
 //RC compiler
-CMAKE_RC_COMPILER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/windres.exe
+CMAKE_RC_COMPILER:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/windres.exe
 
 //Flags for Windows Resource Compiler during all build types.
 CMAKE_RC_FLAGS:STRING=
@@ -247,7 +247,7 @@ CMAKE_RC_FLAGS_RELEASE:STRING=
 CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=
 
 //Path to a program.
-CMAKE_READELF:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/readelf.exe
+CMAKE_READELF:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/readelf.exe
 
 //Flags used by the linker during the creation of shared libraries
 // during all build types.
@@ -297,7 +297,7 @@ CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
 CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
 
 //Path to a program.
-CMAKE_STRIP:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/strip.exe
+CMAKE_STRIP:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/strip.exe
 
 //If this value is on, makefiles will be generated without the
 // .SILENT directive, and all commands will be echoed to the console
@@ -306,16 +306,16 @@ CMAKE_STRIP:FILEPATH=C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/str
 CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
 
 //Value Computed by CMake
-Coral3D_BINARY_DIR:STATIC=C:/Game Development/Visual Studio Solutions/Coral3D/build/debug
+Coral3D_BINARY_DIR:STATIC=E:/Game Development/Visual Studio Solutions/Coral3D/build/debug
 
 //Value Computed by CMake
 Coral3D_IS_TOP_LEVEL:STATIC=ON
 
 //Value Computed by CMake
-Coral3D_SOURCE_DIR:STATIC=C:/Game Development/Visual Studio Solutions/Coral3D
+Coral3D_SOURCE_DIR:STATIC=E:/Game Development/Visual Studio Solutions/Coral3D
 
 //Value Computed by CMake
-GLFW_BINARY_DIR:STATIC=C:/Game Development/Visual Studio Solutions/Coral3D/build/debug/third_party/GLFW
+GLFW_BINARY_DIR:STATIC=E:/Game Development/Visual Studio Solutions/Coral3D/build/debug/third_party/GLFW
 
 //Build the GLFW documentation
 GLFW_BUILD_DOCS:BOOL=OFF
@@ -333,7 +333,7 @@ GLFW_INSTALL:BOOL=ON
 GLFW_IS_TOP_LEVEL:STATIC=OFF
 
 //Value Computed by CMake
-GLFW_SOURCE_DIR:STATIC=C:/Game Development/Visual Studio Solutions/Coral3D/third_party/GLFW
+GLFW_SOURCE_DIR:STATIC=E:/Game Development/Visual Studio Solutions/Coral3D/third_party/GLFW
 
 //Force use of high-performance GPU on hybrid systems
 GLFW_USE_HYBRID_HPG:BOOL=OFF
@@ -366,7 +366,7 @@ CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
 //ADVANCED property for variable: CMAKE_AR
 CMAKE_AR-ADVANCED:INTERNAL=1
 //This is the directory where this CMakeCache.txt was created
-CMAKE_CACHEFILE_DIR:INTERNAL=c:/Game Development/Visual Studio Solutions/Coral3D/build/debug
+CMAKE_CACHEFILE_DIR:INTERNAL=e:/Game Development/Visual Studio Solutions/Coral3D/build/debug
 //Major version of cmake used to create the current loaded cache
 CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
 //Minor version of cmake used to create the current loaded cache
@@ -374,11 +374,11 @@ CMAKE_CACHE_MINOR_VERSION:INTERNAL=26
 //Patch version of cmake used to create the current loaded cache
 CMAKE_CACHE_PATCH_VERSION:INTERNAL=4
 //Path to CMake executable.
-CMAKE_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/cmake.exe
+CMAKE_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2/bin/cmake/win/x64/bin/cmake.exe
 //Path to cpack program executable.
-CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/cpack.exe
+CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2/bin/cmake/win/x64/bin/cpack.exe
 //Path to ctest program executable.
-CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/bin/ctest.exe
+CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2/bin/cmake/win/x64/bin/ctest.exe
 //ADVANCED property for variable: CMAKE_CXX_COMPILER
 CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1
 //ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
@@ -445,7 +445,7 @@ CMAKE_GENERATOR_TOOLSET:INTERNAL=
 CMAKE_HAVE_LIBC_PTHREAD:INTERNAL=1
 //Source directory with the top level CMakeLists.txt file for this
 // project
-CMAKE_HOME_DIRECTORY:INTERNAL=C:/Game Development/Visual Studio Solutions/Coral3D
+CMAKE_HOME_DIRECTORY:INTERNAL=E:/Game Development/Visual Studio Solutions/Coral3D
 //ADVANCED property for variable: CMAKE_INSTALL_BINDIR
 CMAKE_INSTALL_BINDIR-ADVANCED:INTERNAL=1
 //ADVANCED property for variable: CMAKE_INSTALL_DATADIR
@@ -518,7 +518,7 @@ CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
 //ADVANCED property for variable: CMAKE_READELF
 CMAKE_READELF-ADVANCED:INTERNAL=1
 //Path to CMake installation.
-CMAKE_ROOT:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2.1/bin/cmake/win/x64/share/cmake-3.26
+CMAKE_ROOT:INTERNAL=C:/Program Files/JetBrains/CLion 2023.2/bin/cmake/win/x64/share/cmake-3.26
 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
 CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG

+ 3 - 3
build/debug/third_party/GLFW/src/cmake_install.cmake

@@ -1,4 +1,4 @@
-# Install script for directory: C:/Game Development/Visual Studio Solutions/Coral3D/third_party/GLFW/src
+# Install script for directory: E:/Game Development/Visual Studio Solutions/Coral3D/third_party/GLFW/src
 
 # Set the install prefix
 if(NOT DEFINED CMAKE_INSTALL_PREFIX)
@@ -34,10 +34,10 @@ endif()
 
 # Set default install directory permissions.
 if(NOT DEFINED CMAKE_OBJDUMP)
-  set(CMAKE_OBJDUMP "C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/objdump.exe")
+  set(CMAKE_OBJDUMP "C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/objdump.exe")
 endif()
 
 if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
-  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "C:/Game Development/Visual Studio Solutions/Coral3D/build/debug/third_party/GLFW/src/libglfw3.a")
+  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "E:/Game Development/Visual Studio Solutions/Coral3D/build/debug/third_party/GLFW/src/libglfw3.a")
 endif()
 

+ 2 - 2
build/release/Testing/Temporary/LastTest.log

@@ -1,3 +1,3 @@
-Start testing: Sep 12 22:58 Romance Daylight Time
+Start testing: Sep 13 17:31 Romance Daylight Time
 ----------------------------------------------------------
-End testing: Sep 12 22:58 Romance Daylight Time
+End testing: Sep 13 17:31 Romance Daylight Time

+ 3 - 3
build/release/third_party/GLFW/src/cmake_install.cmake

@@ -1,4 +1,4 @@
-# Install script for directory: C:/Game Development/Visual Studio Solutions/Coral3D/third_party/GLFW/src
+# Install script for directory: E:/Game Development/Visual Studio Solutions/Coral3D/third_party/GLFW/src
 
 # Set the install prefix
 if(NOT DEFINED CMAKE_INSTALL_PREFIX)
@@ -34,10 +34,10 @@ endif()
 
 # Set default install directory permissions.
 if(NOT DEFINED CMAKE_OBJDUMP)
-  set(CMAKE_OBJDUMP "C:/Program Files/JetBrains/CLion 2023.2.1/bin/mingw/bin/objdump.exe")
+  set(CMAKE_OBJDUMP "C:/Program Files/JetBrains/CLion 2023.2/bin/mingw/bin/objdump.exe")
 endif()
 
 if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
-  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "C:/Game Development/Visual Studio Solutions/Coral3D/build/release/third_party/GLFW/src/libglfw3.a")
+  file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE STATIC_LIBRARY FILES "E:/Game Development/Visual Studio Solutions/Coral3D/build/release/third_party/GLFW/src/libglfw3.a")
 endif()
 

+ 1 - 1
coral_renderer/coral_material.h

@@ -38,7 +38,7 @@ namespace coral_3d
         coral_device& device_;
         VkPipelineLayout pipeline_layout_;
 
-        std::shared_ptr<coral_texture> texture_;
+        std::unique_ptr<coral_texture> texture_;
         VkDescriptorSet material_desc_set_;
 
         tinyobj::material_t tiny_obj_material_;

+ 1 - 1
coral_renderer/coral_texture.cpp

@@ -70,7 +70,7 @@ bool coral_texture::Builder::load_image_from_file(coral_device& device, const st
 	device.copy_buffer_to_image(staging_buffer.get_buffer(), image, img_extent.width, img_extent.height, 1);
 	generate_mipmaps(device, tex_width, tex_height);
 
-	device.transition_image_layout(image.image, img_format, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, 1, mip_levels);
+	// device.transition_image_layout(image.image, img_format, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, 1, mip_levels);
 
 	return true;
 }

+ 1 - 1
coral_renderer/render_system.h

@@ -8,7 +8,7 @@
 #include "coral_descriptors.h"
 #include "coral_texture.h"
 #define MAX_MATERIAL_SETS 4096
-#define MAX_TEXTURES 1
+#define MAX_TEXTURES 8
 
 // STD
 #include <memory>

+ 6 - 6
coral_renderer/vk_types.h

@@ -44,18 +44,18 @@ struct GlobalUBO
 struct MaterialUBO
 {
     // DIFFUSE
-    bool use_diff_map;
-    glm::vec3 diffuse_color;
+    alignas(4) bool use_diff_map;
+    alignas(16) glm::vec3 diffuse_color;
 
     // SPECULAR
-    bool use_specular_map;
-    glm::vec3 specular_color;
+    alignas(4) bool use_specular_map;
+    alignas(16) glm::vec3 specular_color;
     float shininess;
 
     // BUMP / NORMAL
-    bool use_bump_map;
+    alignas(4) bool use_bump_map;
 
     // ALPHA BLENDING
-    bool use_opacity_map;
+    alignas(4) bool use_opacity_map;
     float opacity_value;
 };

BIN
shaders/compiled/simple_shader.frag.spv


+ 1 - 7
shaders/simple_shader.frag

@@ -54,13 +54,7 @@ vec3 calculate_diffuse(vec3 col, vec3 norm)
 void main()
 {
 	vec3 ambient = ubo.ambientLightColor.xyz * ubo.ambientLightColor.w;
-
-	vec3 color;
-	if(materialUbo.useOpacityMap)
-		color = materialUbo.diffuseColor;
-	else
-		color = texture(sampler2D(textures, samp), fragUV).xyz;
-
+	vec3 color = texture(sampler2D(textures, samp), fragUV).xyz;
 	vec3 diffuse = calculate_diffuse(color, fragNormal);
 
 	outColor = vec4(diffuse + ambient, 1.0f);