Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
2b5636a
Updated INSTRUCTION.md
YVin3D Sep 18, 2018
956abc8
Update CMake and project setup
shehzan10 Sep 17, 2019
1663b39
Update deadline
shehzan10 Sep 17, 2019
2b9e11c
Updated instructions with new slides and denoiser extra credit
YVin3D Sep 17, 2019
b3864ff
Merged instructions update
YVin3D Sep 17, 2019
f14aed0
Typo fixes in INSTRUCTION.md
shehzan10 Sep 17, 2019
9bdc3f9
Update INSTRUCTION.md
Sep 17, 2019
187f245
Update INSTRUCTION.md
Sep 17, 2019
aa1883b
Add missing libraries
shehzan10 Sep 18, 2019
f75c7b6
Update instructions for Fall 2020
shehzan10 Sep 22, 2020
75b8c6f
multiply box intersection normal by invTranspose instead of transform
likangning93 Sep 23, 2020
8da8dd7
Update description for "re-startable path tracing"
likangning93 Sep 23, 2020
7547dc7
update gpu gems links
likangning93 Sep 25, 2020
abf09f1
Remove unused freeglut copyrights
shehzan10 Jan 16, 2021
39089c2
Update CUDA Computes List
shehzan10 Sep 10, 2021
a48b15f
Retab
shehzan10 Sep 10, 2021
0a40d8f
Update instructions for Fall 2021
shehzan10 Sep 18, 2021
098dc94
Add vulkan option
shehzan10 Sep 18, 2021
b6c6cd8
Add sample readmes for inspiration
shehzan10 Sep 19, 2021
8474371
Merge pull request #1 from CIS565-Fall-2021/update-instructions-2021
shehzan10 Sep 21, 2021
614c77c
Added Imgui Integration Files
codeplay9800 Sep 19, 2022
d3d272c
Updated Instruction.md
codeplay9800 Sep 19, 2022
58f5a4b
Update Instruction.md
codeplay9800 Sep 19, 2022
684ebcf
Merge branch 'main' into Integrate_Imgui
codeplay9800 Sep 19, 2022
e9a589b
Imgui Integrated
codeplay9800 Sep 20, 2022
61f425f
Added GUIDataContainer Class
codeplay9800 Sep 20, 2022
1918ff2
Removed ImGUI Cmake
codeplay9800 Sep 21, 2022
e5e7e1c
Update INSTRUCTION.md
shehzan10 Sep 21, 2022
a16d884
Fix a bug that causes MouseOverImGuiWindow() to not work
dw218192 Sep 22, 2022
15e6477
Merge pull request #1 from dw218192/patch-1
codeplay9800 Sep 22, 2022
709f82d
Update INSTRUCTION.md
HummaWhite Sep 16, 2023
1d83363
Added a section for optimization
wayne-wu Sep 18, 2023
61f0ca7
Update INSTRUCTION.md
HummaWhite Sep 19, 2023
acb7970
basic path tracing
JChunX Sep 25, 2023
65a3dbf
debug path sorting
JChunX Sep 28, 2023
e11390a
fix stream compaction
JChunX Sep 29, 2023
2bbfba0
gbuffer impl
JChunX Sep 30, 2023
ea1af3f
mesh & camera loading
JChunX Oct 4, 2023
fd5e25a
ray intersections
JChunX Oct 5, 2023
94b6bc3
octree impl
JChunX Oct 8, 2023
3c457b6
delete large files
JChunX Oct 8, 2023
a4bd4d4
ignore rule for large bin file
JChunX Oct 8, 2023
a5a3e3d
fix octree memory bug
JChunX Oct 8, 2023
f76a3c7
fix octrees
JChunX Oct 10, 2023
0c07405
full octree impl with overlaps
JChunX Oct 10, 2023
8b3c706
code clean up + report
JChunX Oct 12, 2023
7516741
Delete report1.nsys-rep
JChunX Oct 12, 2023
2c54f56
Delete report1.sqlite
JChunX Oct 12, 2023
d60e165
Delete report2.nsys-rep
JChunX Oct 12, 2023
a67bb10
Delete report3.nsys-rep
JChunX Oct 12, 2023
4e549f9
Delete report4.nsys-rep
JChunX Oct 12, 2023
e852866
Delete report5.nsys-rep
JChunX Oct 12, 2023
f64622c
Update README.md
JChunX Oct 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -558,3 +558,4 @@ xcuserdata
*.xccheckout
*.moved-aside
*.xcuserstate
scenes/village.bin
Expand Down
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "CUDA C++: Launch",
"type": "cuda-gdb",
"request": "launch",
"program": ""
},
{
"name": "CUDA C++: Attach",
"type": "cuda-gdb",
"request": "attach",
"processId": "${command:cuda.pickProcess}"
}
]
}
84 changes: 84 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"ros.distro": "humble",
"files.associations": {
"*.sdf": "xml",
"*.world": "xml",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"strstream": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"chrono": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"fstream": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"semaphore": "cpp",
"shared_mutex": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cfenv": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"variant": "cpp",
"*.ipp": "cpp"
},
"C_Cpp.default.compilerPath": "/usr/bin/gcc"
}
176 changes: 101 additions & 75 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,95 +1,121 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.1)

project(cis565_path_tracer)

set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

# Set up include and lib paths
set(EXTERNAL "external")
include_directories("${EXTERNAL}")
include_directories("${EXTERNAL}/include")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(EXTERNAL_LIB_PATH "${EXTERNAL}/lib/osx")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(EXTERNAL_LIB_PATH "${EXTERNAL}/lib/linux" "/usr/lib64")
elseif(WIN32)
set(EXTERNAL_LIB_PATH "${EXTERNAL}/lib/win")
endif()
link_directories(${EXTERNAL_LIB_PATH})
list(APPEND CMAKE_LIBRARY_PATH "${EXTERNAL_LIB_PATH}")


# Find up and set up core dependency libs
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

set(GLFW_INCLUDE_DIR "${EXTERNAL}/include")
set(GLFW_LIBRARY_DIR "${CMAKE_LIBRARY_PATH}")
find_library(GLFW_LIBRARY "glfw3" HINTS "${GLFW_LIBRARY_DIR}")

set(GLEW_INCLUDE_DIR "${EXTERNAL}/include")
set(GLEW_LIBRARY_DIR "${CMAKE_LIBRARY_PATH}")
add_definitions(-DGLEW_STATIC)
find_package(GLEW)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

find_package(OpenGL)

set(CORELIBS
"${GLFW_LIBRARY}"
"${OPENGL_LIBRARY}"
"${GLEW_LIBRARY}"
)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

# Enable C++11 for host code
set(CMAKE_CXX_STANDARD 11)

# Enable CUDA debug info in debug mode builds
list(APPEND CUDA_NVCC_FLAGS_DEBUG -G -g)

# OSX-specific hacks/fixes
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND CORELIBS "-framework IOKit")
list(APPEND CORELIBS "-framework Cocoa")
list(APPEND CORELIBS "-framework CoreVideo")
# Set a default build type if none was specified
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

# Linux-specific hacks/fixes
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
list(APPEND CMAKE_EXE_LINKER_FLAGS "-lX11 -lXxf86vm -lXrandr -lXi")
endif()

if (WIN32)
list(APPEND CORELIBS legacy_stdio_definitions.lib)
endif()
########################################
# CUDA Setup
########################################
find_package(CUDA 10 REQUIRED)
include(${CMAKE_MODULE_PATH}/CUDAComputesList.cmake)

list(APPEND CUDA_NVCC_FLAGS ${CUDA_GENERATE_CODE})
list(APPEND CUDA_NVCC_FLAGS_DEBUG "-g -G")
set(CUDA_VERBOSE_BUILD ON)

if(WIN32)
# Set up include and lib paths
set(CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER} CACHE FILEPATH "Host side compiler used by NVCC" FORCE)
endif(WIN32)
########################################

find_package(OpenGL REQUIRED)

if(UNIX)
find_package(glfw3 REQUIRED)
find_package(GLEW REQUIRED)
set(LIBRARIES glfw ${GLEW_LIBRARIES} ${OPENGL_gl_LIBRARY})
else(UNIX)
set(EXTERNAL "external")

set(GLFW_ROOT_DIR ${EXTERNAL})
set(GLFW_USE_STATIC_LIBS ON)
find_package(GLFW REQUIRED)

set(GLEW_ROOT_DIR ${EXTERNAL})
set(GLEW_USE_STATIC_LIBS ON)
find_package(GLEW REQUIRED)

add_definitions(${GLEW_DEFINITIONS})
include_directories(${GLEW_INCLUDE_DIR} ${GLFW_INCLUDE_DIR})
set(LIBRARIES ${GLEW_LIBRARY} ${GLFW_LIBRARY} ${OPENGL_LIBRARY})
endif(UNIX)

set(GLM_ROOT_DIR "external")
find_package(GLM REQUIRED)
include_directories(${GLM_INCLUDE_DIRS})

set(headers
src/main.h
src/image.h
src/interactions.h
src/intersections.h
src/glslUtility.hpp
src/pathtrace.h
src/scene.h
src/sceneStructs.h
src/preview.h
src/utilities.h
src/ImGui/imconfig.h

src/ImGui/imgui.h
src/ImGui/imconfig.h
src/ImGui/imgui_impl_glfw.h
src/ImGui/imgui_impl_opengl3.h
src/ImGui/imgui_impl_opengl3_loader.h
src/ImGui/imgui_internal.h
src/ImGui/imstb_rectpack.h
src/ImGui/imstb_textedit.h
src/ImGui/imstb_truetype.h
)

# Crucial magic for CUDA linking
find_package(Threads REQUIRED)
find_package(CUDA 8.0 REQUIRED)
set(sources
src/main.cpp
src/stb.cpp
src/image.cpp
src/glslUtility.cpp
src/pathtrace.cu
src/scene.cpp
src/preview.cpp
src/utilities.cpp

src/ImGui/imgui.cpp
src/ImGui/imgui_demo.cpp
src/ImGui/imgui_draw.cpp
src/ImGui/imgui_impl_glfw.cpp
src/ImGui/imgui_impl_opengl3.cpp
src/ImGui/imgui_tables.cpp
src/ImGui/imgui_widgets.cpp
)

set(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE ON)
set(CUDA_SEPARABLE_COMPILATION ON)
list(SORT headers)
list(SORT sources)

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
endif()
source_group(Headers FILES ${headers})
source_group(Sources FILES ${sources})

include_directories(.)
#add_subdirectory(src/ImGui)
#add_subdirectory(stream_compaction) # TODO: uncomment if using your stream compaction
add_subdirectory(src)

cuda_add_executable(${CMAKE_PROJECT_NAME}
"src/main.h"
"src/main.cpp"
)

cuda_add_executable(${CMAKE_PROJECT_NAME} ${sources} ${headers})
target_link_libraries(${CMAKE_PROJECT_NAME}
src
${LIBRARIES}
#stream_compaction # TODO: uncomment if using your stream compaction
${CORELIBS}
)

add_custom_command(
TARGET ${CMAKE_PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/shaders
${CMAKE_BINARY_DIR}/shaders
)
Loading