mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-26 16:01:34 +00:00
fix(ugc): transparent bricks drawn see-through in mixed models; dUgcServer in folders by role
- The client puts a shape in its sorted, blended pass only when its NiMaterialProperty alpha is under 0.99999 (ShaderCommon::GetAlphaFlags 0x0109f5a0; the NiAlphaProperty blend flag isn't read); at 1.0 it's drawn solid with blending off. Transparent (and transparent glitter) shapes now get a material with alpha 0.9999, as the S01_Alpha shapes of the game's own brick models (res/BrickModels/ndmade) do; opaque shapes keep 1.0. Models with a transparent brick change; the others are byte for byte the same. - dUgcServer's files move into Bricks/, Model/, Render/, Formats/ and Processing/ (the CMakeLists says what each holds); includes are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,25 +1,34 @@
|
||||
# The UGC server (docs/UgcServer.md), in folders by role:
|
||||
# Bricks/ the client's brick data: primitives, Materials.xml, LU Toolbox's palette, the CDClient's module data
|
||||
# Model/ player models built from LXFML, car and rocket module combinations, glitter
|
||||
# Render/ the software rasterizer, ambient occlusion, hidden-face removal, icon parameters and pose
|
||||
# Formats/ the files written for the client and the dashboard (NIF, DDS, PNG, sd0)
|
||||
# Processing/ the job queue and workers, the CPU budget, stored files
|
||||
# UgcServer.cpp the server: settings, the master link, HTTP routes
|
||||
|
||||
# The pure part of the UGC server (brick data, meshes, rendering, file formats, storage), shared with the tests
|
||||
set(DUGC_SOURCES
|
||||
"UgcBricks.cpp"
|
||||
"UgcFormats.cpp"
|
||||
"UgcGlitter.cpp"
|
||||
"UgcHsr.cpp"
|
||||
"UgcIconParams.cpp"
|
||||
"UgcIconPose.cpp"
|
||||
"UgcJobs.cpp"
|
||||
"UgcModel.cpp"
|
||||
"UgcModular.cpp"
|
||||
"UgcPalette.cpp"
|
||||
"UgcRender.cpp"
|
||||
"UgcStorage.cpp"
|
||||
"UgcThrottle.cpp"
|
||||
"Bricks/UgcBricks.cpp"
|
||||
"Bricks/UgcPalette.cpp"
|
||||
"Formats/UgcFormats.cpp"
|
||||
"Model/UgcGlitter.cpp"
|
||||
"Model/UgcModel.cpp"
|
||||
"Model/UgcModular.cpp"
|
||||
"Processing/UgcJobs.cpp"
|
||||
"Processing/UgcStorage.cpp"
|
||||
"Processing/UgcThrottle.cpp"
|
||||
"Render/UgcHsr.cpp"
|
||||
"Render/UgcIconParams.cpp"
|
||||
"Render/UgcIconPose.cpp"
|
||||
"Render/UgcRender.cpp"
|
||||
)
|
||||
|
||||
add_library(dUgc STATIC ${DUGC_SOURCES})
|
||||
target_include_directories(dUgc PUBLIC "." "${PROJECT_SOURCE_DIR}/thirdparty/MD5" "${PROJECT_SOURCE_DIR}/thirdparty/nlohmann")
|
||||
target_include_directories(dUgc PUBLIC "." "Bricks" "Formats" "Model" "Processing" "Render"
|
||||
"${PROJECT_SOURCE_DIR}/thirdparty/MD5" "${PROJECT_SOURCE_DIR}/thirdparty/nlohmann")
|
||||
target_link_libraries(dUgc PUBLIC dCommon glm::glm tinyxml2 MD5)
|
||||
|
||||
add_executable(UgcServer "UgcServer.cpp" "UgcProcessor.cpp" "UgcCdClient.cpp")
|
||||
add_executable(UgcServer "UgcServer.cpp" "Processing/UgcProcessor.cpp" "Bricks/UgcCdClient.cpp")
|
||||
|
||||
target_include_directories(UgcServer PRIVATE
|
||||
"${PROJECT_SOURCE_DIR}/dCommon"
|
||||
@@ -42,5 +51,5 @@ target_link_libraries(UgcServer ${COMMON_LIBRARIES} dWeb dServer dUgc)
|
||||
|
||||
# Rendering is far too slow unoptimized (minutes a model instead of seconds), so it is optimized in every build type
|
||||
if(NOT MSVC)
|
||||
set_source_files_properties("UgcRender.cpp" "UgcHsr.cpp" "UgcModel.cpp" "UgcPalette.cpp" "UgcGlitter.cpp" PROPERTIES COMPILE_OPTIONS "-O2")
|
||||
set_source_files_properties("Render/UgcRender.cpp" "Render/UgcHsr.cpp" "Model/UgcModel.cpp" "Bricks/UgcPalette.cpp" "Model/UgcGlitter.cpp" PROPERTIES COMPILE_OPTIONS "-O2")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user