mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-27 22:27:46 +00:00
I started writing this late last year, and finally uploading parts of it. Currently, doesn't work, but doesn't crash either. Enable it via the NOVUS_USE_NEW_RENDERER environment variable. The goal is to use the game's own shaders instead of creating our own, it's lacking support for buffers with actual data in them and constants so while it "works" nothing is displayed on screen yet.
40 lines
No EOL
1.1 KiB
CMake
40 lines
No EOL
1.1 KiB
CMake
# SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
find_package(spirv_cross_core REQUIRED)
|
|
find_package(spirv_cross_glsl REQUIRED)
|
|
find_package(SPIRV-Headers REQUIRED)
|
|
|
|
add_library(renderer STATIC)
|
|
target_sources(renderer
|
|
PRIVATE
|
|
include/renderer.hpp
|
|
|
|
src/renderer.cpp
|
|
src/imguipass.cpp
|
|
src/imguipass.h
|
|
src/rendersystem.cpp
|
|
include/rendersystem.h)
|
|
qt_add_resources(renderer
|
|
"shaders"
|
|
PREFIX "/"
|
|
FILES
|
|
shaders/imgui.frag.spv
|
|
shaders/imgui.vert.spv
|
|
shaders/mesh.frag.spv
|
|
shaders/mesh.vert.spv
|
|
shaders/skinned.vert.spv)
|
|
target_include_directories(renderer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
target_link_libraries(renderer
|
|
PUBLIC
|
|
Qt6::Core
|
|
Vulkan::Vulkan
|
|
Physis::Physis
|
|
glm::glm
|
|
imgui
|
|
dxbc
|
|
spirv-cross-core
|
|
spirv-cross-glsl)
|
|
target_compile_definitions(renderer PUBLIC GLM_FORCE_RADIANS GLM_FORCE_DEPTH_ZERO_TO_ONE GLM_ENABLE_EXPERIMENTAL)
|
|
|
|
add_library(Novus::Renderer ALIAS renderer) |