mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-22 12:07:45 +00:00
No longer hardcode the SHPK node selector
This commit is contained in:
parent
699141d04b
commit
d651f56e2b
2 changed files with 26 additions and 3 deletions
2
extern/libphysis
vendored
2
extern/libphysis
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 991146eeff4c154a6206d58a9f17b4ecea517d58
|
Subproject commit 5241b087e4514cabd4dc825a8ec56ff33d4350ea
|
|
@ -141,8 +141,31 @@ void RenderSystem::render(uint32_t imageIndex, VkCommandBuffer commandBuffer)
|
||||||
// hardcoded to the known pass for now
|
// hardcoded to the known pass for now
|
||||||
if (std::string_view{"PASS_G_OPAQUE"} == pass) {
|
if (std::string_view{"PASS_G_OPAQUE"} == pass) {
|
||||||
for (auto &model : m_renderModels) {
|
for (auto &model : m_renderModels) {
|
||||||
// hardcoded selector for now
|
std::vector<uint32_t> systemKeys;
|
||||||
const u_int32_t selector = 276147857;
|
std::vector<uint32_t> sceneKeys = {
|
||||||
|
physis_shpk_crc("TransformViewSkin"),
|
||||||
|
physis_shpk_crc("GetAmbientLight_SH"),
|
||||||
|
physis_shpk_crc("GetReflectColor_Texture"),
|
||||||
|
physis_shpk_crc("GetAmbientOcclusion_None"),
|
||||||
|
physis_shpk_crc("ApplyDitherClipOff"),
|
||||||
|
};
|
||||||
|
std::vector<uint32_t> materialKeys;
|
||||||
|
for (int j = 0; j < model.shpk.num_material_keys; j++) {
|
||||||
|
materialKeys.push_back(model.shpk.material_keys[j].default_value);
|
||||||
|
}
|
||||||
|
std::vector<uint32_t> subviewKeys = {
|
||||||
|
physis_shpk_crc("Default"),
|
||||||
|
physis_shpk_crc("SUB_VIEW_MAIN"),
|
||||||
|
};
|
||||||
|
|
||||||
|
const u_int32_t selector = physis_shpk_build_selector_from_all_keys(systemKeys.data(),
|
||||||
|
systemKeys.size(),
|
||||||
|
sceneKeys.data(),
|
||||||
|
sceneKeys.size(),
|
||||||
|
materialKeys.data(),
|
||||||
|
materialKeys.size(),
|
||||||
|
subviewKeys.data(),
|
||||||
|
subviewKeys.size());
|
||||||
const physis_SHPKNode node = physis_shpk_get_node(&model.shpk, selector);
|
const physis_SHPKNode node = physis_shpk_get_node(&model.shpk, selector);
|
||||||
|
|
||||||
// check if invalid
|
// check if invalid
|
||||||
|
|
Loading…
Add table
Reference in a new issue