mirror of
https://github.com/redstrate/Novus.git
synced 2025-04-23 04:27:45 +00:00
Add temporary workarounds for tiled normals
We don't have any way of getting tiled materials yet, so enable simple mode.
This commit is contained in:
parent
35dab8e925
commit
b64c59ab76
1 changed files with 13 additions and 1 deletions
|
@ -279,7 +279,12 @@ void GameRenderer::render(VkCommandBuffer commandBuffer, uint32_t imageIndex, Ca
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (int z = 0; z < renderMaterial.mat.num_shader_keys; z++) {
|
for (int z = 0; z < renderMaterial.mat.num_shader_keys; z++) {
|
||||||
if (renderMaterial.mat.shader_keys[z].category == id) {
|
if (renderMaterial.mat.shader_keys[z].category == id) {
|
||||||
materialKeys.push_back(renderMaterial.mat.shader_keys[z].value);
|
// TODO: Temporary workaround for materials that need tile normals
|
||||||
|
if (id == 0xB616DC5A) {
|
||||||
|
materialKeys.push_back(0x22A4AABF);
|
||||||
|
} else {
|
||||||
|
materialKeys.push_back(renderMaterial.mat.shader_keys[z].value);
|
||||||
|
}
|
||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -900,6 +905,13 @@ GameRenderer::bindPipeline(VkCommandBuffer commandBuffer, std::string_view passN
|
||||||
|
|
||||||
VkPipelineColorBlendAttachmentState colorBlendAttachment = {};
|
VkPipelineColorBlendAttachmentState colorBlendAttachment = {};
|
||||||
colorBlendAttachment.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
|
colorBlendAttachment.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
|
||||||
|
colorBlendAttachment.blendEnable = VK_TRUE;
|
||||||
|
colorBlendAttachment.srcColorBlendFactor = VK_BLEND_FACTOR_ONE;
|
||||||
|
colorBlendAttachment.dstColorBlendFactor = VK_BLEND_FACTOR_ZERO;
|
||||||
|
colorBlendAttachment.colorBlendOp = VK_BLEND_OP_ADD;
|
||||||
|
colorBlendAttachment.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE;
|
||||||
|
colorBlendAttachment.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO;
|
||||||
|
colorBlendAttachment.alphaBlendOp = VK_BLEND_OP_ADD;
|
||||||
|
|
||||||
std::vector<VkPipelineColorBlendAttachmentState> colorBlendAttachments;
|
std::vector<VkPipelineColorBlendAttachmentState> colorBlendAttachments;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue