mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-01 09:27:14 +00:00
fix(dashboard): scenery models keep their colors, lit like the game
Glom models (multishader) drew their trees, rocks, fences and water white. Their conversions kept on disk from before meshes carried their multishader tag were still served (the cache format version was never bumped), so every part fell back to the LEGO shader, whose texture alpha lays the (mostly grey) texture over the vertex colors that hold the actual colors. Browsers also kept those models for a week. - Bump the conversion format so old conversions are made again, and put it in the manifests; the viewers add it to model and texture URLs. - Light scenery as the client's shaders do: the scene's sun and ambient light from its .lvl (read as level_read_lighting_info, 0x0102f8f0, and EnvironmentManager::SetLightEnv, 0x01088aa0, do), per vertex, clamped, instead of the view's own lights, environment map and tone mapping. The zone takes the lighting most of its objects' scenes have. - Programmable shaders read vertex colors and ignore NiMaterialProperty's color and alpha; unlit and untextured shaders (by mapShaders gameValue) leave out lighting or the texture. Fixed function stays as it was. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -82,3 +82,10 @@ target_link_libraries(dWebTests ${COMMON_LIBRARIES} dWeb dUgc sqlite3 OpenSSL::C
|
||||
gtest_discover_tests(dWebTests)
|
||||
|
||||
target_compile_definitions(dWebTests PRIVATE DLU_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
|
||||
|
||||
# The 3D views' shader lookups (static/js/scenery-core.js), when node is there
|
||||
find_program(NODE_EXECUTABLE node)
|
||||
if(NODE_EXECUTABLE)
|
||||
add_test(NAME SceneryCoreJs COMMAND ${NODE_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/scenery-core.test.mjs"
|
||||
"${PROJECT_SOURCE_DIR}/dDashboardServer/static/js/scenery-core.js")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user