Fixed more shadows
This commit is contained in:
parent
39bebd1db4
commit
1d16bd2744
|
@ -26,12 +26,12 @@ layout (std430, set = 2, binding = 1) buffer AnimBoneMatrices
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
// // Compute bone matrix
|
// // Compute bone matrix
|
||||||
// mat4 boneMatrix = BoneMatrices.data[firstBoneIndex + aBoneIndices[0]] * aBoneWeights[0];
|
mat4 boneMatrix = BoneMatrices.data[firstBoneIndex + aBoneIndices[0]] * aBoneWeights[0];
|
||||||
// boneMatrix += BoneMatrices.data[firstBoneIndex + aBoneIndices[1]] * aBoneWeights[1];
|
boneMatrix += BoneMatrices.data[firstBoneIndex + aBoneIndices[1]] * aBoneWeights[1];
|
||||||
// boneMatrix += BoneMatrices.data[firstBoneIndex + aBoneIndices[2]] * aBoneWeights[2];
|
boneMatrix += BoneMatrices.data[firstBoneIndex + aBoneIndices[2]] * aBoneWeights[2];
|
||||||
// boneMatrix += BoneMatrices.data[firstBoneIndex + aBoneIndices[3]] * aBoneWeights[3];
|
boneMatrix += BoneMatrices.data[firstBoneIndex + aBoneIndices[3]] * aBoneWeights[3];
|
||||||
|
|
||||||
// clip space for rendering
|
// clip space for rendering
|
||||||
gl_Position = cameraData.vpMat * worldTransform * vec4 (aVertexPos, 1.0f);
|
// gl_Position = cameraData.vpMat * worldTransform * vec4 (aVertexPos, 1.0f);
|
||||||
// gl_Position = cameraData.vpMat * worldTransform * boneMatrix * vec4 (aVertexPos, 1.0f);
|
gl_Position = cameraData.vpMat * worldTransform * boneMatrix * vec4 (aVertexPos, 1.0f);
|
||||||
}
|
}
|
Binary file not shown.
|
@ -726,6 +726,22 @@ namespace SHADE
|
||||||
cmdBuffer->BindVertexBuffer(SHGraphicsConstants::VertexBufferBindings::BONE_MATRIX_FIRST_INDEX, transformDataBuffer[frameIndex], 0);
|
cmdBuffer->BindVertexBuffer(SHGraphicsConstants::VertexBufferBindings::BONE_MATRIX_FIRST_INDEX, transformDataBuffer[frameIndex], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (IsAnimated())
|
||||||
|
{
|
||||||
|
auto const& descMappings = SHGraphicsPredefinedData::GetMappings(SHGraphicsPredefinedData::SystemType::BATCHING_ANIM);
|
||||||
|
if (instanceDataDescSet[frameIndex])
|
||||||
|
{
|
||||||
|
cmdBuffer->BindDescriptorSet
|
||||||
|
(
|
||||||
|
instanceDataDescSet[frameIndex],
|
||||||
|
SH_PIPELINE_TYPE::GRAPHICS,
|
||||||
|
descMappings.at(SHPredefinedDescriptorTypes::PER_INSTANCE_ANIM_BATCH),
|
||||||
|
dynamicOffset
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
auto const& descMappings = SHGraphicsPredefinedData::GetMappings(SHGraphicsPredefinedData::SystemType::BATCHING);
|
auto const& descMappings = SHGraphicsPredefinedData::GetMappings(SHGraphicsPredefinedData::SystemType::BATCHING);
|
||||||
if (instanceDataDescSet[frameIndex])
|
if (instanceDataDescSet[frameIndex])
|
||||||
{
|
{
|
||||||
|
@ -737,6 +753,8 @@ namespace SHADE
|
||||||
dynamicOffset
|
dynamicOffset
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
cmdBuffer->DrawMultiIndirect(drawDataBuffer[frameIndex], static_cast<uint32_t>(drawData.size()));
|
cmdBuffer->DrawMultiIndirect(drawDataBuffer[frameIndex], static_cast<uint32_t>(drawData.size()));
|
||||||
cmdBuffer->EndLabeledSegment();
|
cmdBuffer->EndLabeledSegment();
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace SHADE
|
||||||
{SHPredefinedDescriptorTypes::STATIC_DATA, 0},
|
{SHPredefinedDescriptorTypes::STATIC_DATA, 0},
|
||||||
{SHPredefinedDescriptorTypes::CAMERA, 1},
|
{SHPredefinedDescriptorTypes::CAMERA, 1},
|
||||||
{SHPredefinedDescriptorTypes::PER_INSTANCE_ANIM_BATCH, 2},
|
{SHPredefinedDescriptorTypes::PER_INSTANCE_ANIM_BATCH, 2},
|
||||||
|
{SHPredefinedDescriptorTypes::RENDER_GRAPH_RESOURCE, 3},
|
||||||
});
|
});
|
||||||
|
|
||||||
perSystemData[SHUtilities::ConvertEnum(SystemType::TEXT_RENDERING)].descMappings.AddMappings
|
perSystemData[SHUtilities::ConvertEnum(SystemType::TEXT_RENDERING)].descMappings.AddMappings
|
||||||
|
|
|
@ -497,7 +497,7 @@ namespace SHADE
|
||||||
}
|
}
|
||||||
|
|
||||||
// get target node
|
// get target node
|
||||||
auto targetNode = nodes.begin() + nodeIndexing.at(nodeToAddAfter);
|
auto targetNode = nodes.begin() + nodeIndexing.at(nodeToAddAfter) + 1;
|
||||||
|
|
||||||
auto node = nodes.insert(targetNode, renderGraphStorage->resourceHub->Create<SHRenderGraphNode>(nodeName, renderGraphStorage, std::move(descInitParams), std::vector<Handle<SHRenderGraphNode>>(), true));
|
auto node = nodes.insert(targetNode, renderGraphStorage->resourceHub->Create<SHRenderGraphNode>(nodeName, renderGraphStorage, std::move(descInitParams), std::vector<Handle<SHRenderGraphNode>>(), true));
|
||||||
ReindexNodes ();
|
ReindexNodes ();
|
||||||
|
|
Loading…
Reference in New Issue