forked from RobertBeckebans/TEKUUM-D3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backported Intel's Masked Occlussion Culling from RBDOOM3BFG branch
- Loading branch information
1 parent
030bd23
commit d738973
Showing
34 changed files
with
7,945 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// if an ASE/LWO/OBJ/GLTF model has a surface that uses this material that surface will | ||
// be used for occlusion culling instead of the visual surface(s) | ||
textures/common/occlusion | ||
{ | ||
qer_editorimage textures/common/occlusion.tga | ||
noshadows | ||
occlusion | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# | ||
# CMake file for the masked occlusion culling library | ||
# | ||
set(CMAKE_SUPPRESS_REGENERATION true) | ||
option(USE_AVX512 "Enable experimental AVX-512 support" OFF) | ||
|
||
# | ||
# Lists of all files included in the library | ||
# | ||
set( MOC_AVX512_FILES MaskedOcclusionCullingAVX512.cpp ) | ||
set( MOC_AVX2_FILES MaskedOcclusionCullingAVX2.cpp ) | ||
set( MOC_SSE_FILES MaskedOcclusionCulling.cpp CullingThreadpool.cpp ) | ||
set( MOC_INCLUDE_FILES MaskedOcclusionCulling.h CullingThreadpool.h CompilerSpecific.inl MaskedOcclusionCullingCommon.inl ) | ||
set( MOC_FILES ${MOC_AVX512_FILES} ${MOC_AVX2_FILES} ${MOC_SSE_FILES} ${MOC_INCLUDE_FILES} ) | ||
|
||
# | ||
# Common compiler flags | ||
# | ||
if(MSVC) | ||
if(MSVC_VERSION LESS 1900) | ||
set(CMAKE_CXX_FLAGS "-std=c++11") | ||
endif() | ||
else() | ||
set(CMAKE_CXX_FLAGS "-std=c++11 -m64") | ||
endif() | ||
|
||
if(MSVC) | ||
# | ||
# Setup compiler flags for AVX-512 files (MSVC) | ||
# | ||
|
||
if (USE_AVX512) | ||
SET_SOURCE_FILES_PROPERTIES( ${MOC_AVX512_FILES} PROPERTIES COMPILE_FLAGS "-DUSE_AVX512=1 /arch:AVX2" ) | ||
else() | ||
SET_SOURCE_FILES_PROPERTIES( ${MOC_AVX512_FILES} PROPERTIES COMPILE_FLAGS "/arch:AVX2" ) | ||
endif() | ||
|
||
# | ||
# Setup compiler flags for AVX2 files (MSVC) | ||
# | ||
SET_SOURCE_FILES_PROPERTIES( ${MOC_AVX2_FILES} PROPERTIES COMPILE_FLAGS "/arch:AVX2" ) | ||
|
||
# | ||
# Setup compiler flags for SSE4.1 / SSE2 files (MSVC) | ||
# | ||
if(NOT "${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)") | ||
# SSE2 is always enabled on 64-bit architectures, specifying redundant flag produces a compiler warning | ||
if(MSVC_VERSION LESS 1900) | ||
SET_SOURCE_FILES_PROPERTIES( ${MOC_SSE_FILES} PROPERTIES COMPILE_FLAGS "/arch:SSE2" ) | ||
endif() | ||
endif() | ||
|
||
else() | ||
|
||
# | ||
# Setup compiler flags for AVX-512 files | ||
# | ||
if (USE_AVX512) | ||
SET_SOURCE_FILES_PROPERTIES( ${MOC_AVX512_FILES} PROPERTIES COMPILE_FLAGS "-DUSE_AVX512=1 -mavx512f -mavx512bw -mavx512dq -mavx2 -mfma -msse4.1" ) | ||
else() | ||
SET_SOURCE_FILES_PROPERTIES( ${MOC_AVX512_FILES} PROPERTIES COMPILE_FLAGS "-mavx2 -mfma -msse4.1" ) | ||
endif() | ||
|
||
# | ||
# Setup compiler flags for AVX2 files | ||
# | ||
SET_SOURCE_FILES_PROPERTIES( ${MOC_AVX2_FILES} PROPERTIES COMPILE_FLAGS "-mavx2 -mfma -msse4.1" ) | ||
|
||
# | ||
# Setup compiler flags for SSE4.1 / SSE2 files | ||
# | ||
SET_SOURCE_FILES_PROPERTIES( ${MOC_SSE_FILES} PROPERTIES COMPILE_FLAGS "-msse4.1" ) | ||
|
||
endif() | ||
|
||
# | ||
# Create masked occlusion culling library | ||
# | ||
add_library( MaskedOcclusionCulling ${MOC_FILES} ) | ||
|
||
# | ||
# Add folder to include path | ||
# | ||
target_include_directories(MaskedOcclusionCulling PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
if( MSVC ) | ||
set_target_properties( MaskedOcclusionCulling PROPERTIES FOLDER "libs" ) | ||
endif() |
Oops, something went wrong.