1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-22 12:07:45 +00:00

Use the correct TransformView value if the model is skinned or not

This commit is contained in:
Joshua Goins 2024-04-27 12:42:31 -04:00
parent 88e64b859d
commit e9c857a649

View file

@ -215,13 +215,18 @@ void GameRenderer::render(VkCommandBuffer commandBuffer, uint32_t imageIndex, Ca
if (renderMaterial.type == MaterialType::Skin) { if (renderMaterial.type == MaterialType::Skin) {
systemKeys.push_back(physis_shpk_crc("DecodeDepthBuffer_RAWZ")); systemKeys.push_back(physis_shpk_crc("DecodeDepthBuffer_RAWZ"));
} }
std::vector<uint32_t> sceneKeys = { std::vector<uint32_t> sceneKeys;
physis_shpk_crc("TransformViewSkin"), if (model.skinned) {
physis_shpk_crc("GetAmbientLight_SH"), sceneKeys.push_back(physis_shpk_crc("TransformViewSkin"));
physis_shpk_crc("GetReflectColor_Texture"), } else {
physis_shpk_crc("GetAmbientOcclusion_None"), sceneKeys.push_back(physis_shpk_crc("TransformViewRigid"));
physis_shpk_crc("ApplyDitherClipOff"), }
};
sceneKeys.push_back(physis_shpk_crc("GetAmbientLight_SH"));
sceneKeys.push_back(physis_shpk_crc("GetReflectColor_Texture"));
sceneKeys.push_back(physis_shpk_crc("GetAmbientOcclusion_None"));
sceneKeys.push_back(physis_shpk_crc("ApplyDitherClipOff"));
std::vector<uint32_t> materialKeys; std::vector<uint32_t> materialKeys;
for (int j = 0; j < renderMaterial.shaderPackage.num_material_keys; j++) { for (int j = 0; j < renderMaterial.shaderPackage.num_material_keys; j++) {
auto id = renderMaterial.shaderPackage.material_keys[j].id; auto id = renderMaterial.shaderPackage.material_keys[j].id;