Animation WIP merge #321
|
@ -3,6 +3,6 @@
|
|||
SubPass: G-Buffer Write
|
||||
Properties:
|
||||
data.color: {x: 1, y: 1, z: 1, w: 1}
|
||||
data.textureIndex: 0
|
||||
data.textureIndex: 64651793
|
||||
data.alpha: 0
|
||||
data.beta: {x: 1, y: 1, z: 1}
|
|
@ -71,5 +71,5 @@ void main()
|
|||
boneMatrix += BoneMatrices.data[aBoneIndices[3]] * aBoneWeights[3];
|
||||
|
||||
// clip space for rendering
|
||||
gl_Position = cameraData.vpMat * worldTransform * boneMatrix * vec4 (aVertexPos, 1.0f);
|
||||
gl_Position = cameraData.vpMat * worldTransform * vec4 (aVertexPos, 1.0f);
|
||||
}
|
Binary file not shown.
|
@ -602,10 +602,6 @@ namespace SHADE
|
|||
dynamicOffset
|
||||
);
|
||||
}
|
||||
if (boneMatrixBuffer[frameIndex] && boneFirstIndexBuffer[frameIndex])
|
||||
{
|
||||
cmdBuffer->BindVertexBuffer(SHGraphicsConstants::VertexBufferBindings::BONE_INDICES, boneFirstIndexBuffer[frameIndex], 0);
|
||||
}
|
||||
cmdBuffer->DrawMultiIndirect(drawDataBuffer[frameIndex], static_cast<uint32_t>(drawData.size()));
|
||||
cmdBuffer->EndLabeledSegment();
|
||||
}
|
||||
|
@ -716,13 +712,6 @@ namespace SHADE
|
|||
if (!boneMatrixData.empty())
|
||||
{
|
||||
// Update GPU Buffers
|
||||
const uint32_t BONE_IDX_DATA_BYTES = static_cast<uint32_t>(boneMatrixIndices.size() * sizeof(uint32_t));
|
||||
SHVkUtil::EnsureBufferAndCopyHostVisibleData
|
||||
(
|
||||
device, boneFirstIndexBuffer[frameIndex], boneMatrixIndices.data(), BONE_IDX_DATA_BYTES,
|
||||
BuffUsage::eVertexBuffer,
|
||||
"Batch Bone Indices Buffer"
|
||||
);
|
||||
const uint32_t BONE_MTX_DATA_BYTES = static_cast<uint32_t>(boneMatrixData.size() * sizeof(SHMatrix));
|
||||
SHVkUtil::EnsureBufferAndCopyHostVisibleData
|
||||
(
|
||||
|
|
|
@ -134,7 +134,6 @@ namespace SHADE
|
|||
TripleBuffer instancedIntegerBuffer;
|
||||
TripleBuffer matPropsBuffer;
|
||||
TripleBuffer boneMatrixBuffer;
|
||||
TripleBuffer boneFirstIndexBuffer;
|
||||
TripleDescSet instanceDataDescSet;
|
||||
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|
|
|
@ -154,13 +154,13 @@ namespace SHADE
|
|||
/*-----------------------------------------------------------------------------*/
|
||||
/* Getter Functions */
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
Handle<SHVkBuffer> GetVertexPositionsBuffer() const noexcept { return vertPosBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexTexCoordsBuffer() const noexcept { return vertTexCoordBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexTangentsBuffer() const noexcept { return vertTangentBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexNormalsBuffer() const noexcept { return vertNormalBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexBoneIndicesBuffer() const noexcept { return vertBoneIdxBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexBoneWeightsBuffer() const noexcept { return vertBoneWeightBuffer; }
|
||||
Handle<SHVkBuffer> GetIndexBuffer() const noexcept { return indexBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexPositionsBuffer() const noexcept { return vertPosBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexTexCoordsBuffer() const noexcept { return vertTexCoordBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexTangentsBuffer() const noexcept { return vertTangentBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexNormalsBuffer() const noexcept { return vertNormalBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexBoneIndicesBuffer() const noexcept { return vertBoneIdxBuffer; }
|
||||
Handle<SHVkBuffer> GetVertexBoneWeightsBuffer() const noexcept { return vertBoneWeightBuffer; }
|
||||
Handle<SHVkBuffer> GetIndexBuffer() const noexcept { return indexBuffer; }
|
||||
|
||||
private:
|
||||
/*-----------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in New Issue