Color triangle using barycentric coordinates
This commit is contained in:
parent
8bb1b8de21
commit
85a13ec645
3 changed files with 2 additions and 13 deletions
|
|
@ -7,5 +7,6 @@ hitAttributeNV vec3 attribs;
|
|||
|
||||
void main()
|
||||
{
|
||||
hitValue = vec3(1.0, 1.0, 1.0);
|
||||
const vec3 barycentricCoords = vec3(1.0f - attribs.x - attribs.y, attribs.x, attribs.y);
|
||||
hitValue = barycentricCoords;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -594,18 +594,6 @@ public:
|
|||
|
||||
for (int32_t i = 0; i < drawCmdBuffers.size(); ++i)
|
||||
{
|
||||
VkClearValue clearValues[2];
|
||||
clearValues[0].color = defaultClearColor;
|
||||
clearValues[1].depthStencil = { 1.0f, 0 };
|
||||
|
||||
VkRenderPassBeginInfo renderPassBeginInfo = vks::initializers::renderPassBeginInfo();
|
||||
renderPassBeginInfo.renderPass = renderPass;
|
||||
renderPassBeginInfo.framebuffer = frameBuffers[i];
|
||||
renderPassBeginInfo.renderArea.extent.width = width;
|
||||
renderPassBeginInfo.renderArea.extent.height = height;
|
||||
renderPassBeginInfo.clearValueCount = 2;
|
||||
renderPassBeginInfo.pClearValues = clearValues;
|
||||
|
||||
VK_CHECK_RESULT(vkBeginCommandBuffer(drawCmdBuffers[i], &cmdBufInfo));
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue