replace template image with pointset
This commit is contained in:
parent
1114f4c8ff
commit
2852bf13d6
1 changed files with 1 additions and 11 deletions
|
|
@ -348,7 +348,7 @@ void HelloVulkan::createPointsetImage(const VkCommandBuffer& cmdBuf)
|
|||
|
||||
|
||||
//generate blue noise points
|
||||
const int npoints = 256; //points.size() / NCHANNELS;
|
||||
const int npoints = 16384; //points.size() / NCHANNELS;
|
||||
utk::CustomHeckSampler sampler(0.606f, 8.f, 0.5);
|
||||
auto pointset = utk::Pointset<float>{};
|
||||
std::cout << std::endl << "generating " << npoints << " blue noise points…" << std::endl;
|
||||
|
|
@ -356,7 +356,6 @@ void HelloVulkan::createPointsetImage(const VkCommandBuffer& cmdBuf)
|
|||
|
||||
utk::write_text_pointset("biig_pointset.txt", pointset);
|
||||
|
||||
/*
|
||||
//iterate pointset and fill texture
|
||||
for(int i = 0; i < pointset.Npts(); ++i)
|
||||
{
|
||||
|
|
@ -367,15 +366,6 @@ void HelloVulkan::createPointsetImage(const VkCommandBuffer& cmdBuf)
|
|||
|
||||
points[wholex + wholey * m_size.width] = vec2{fractionalx, fractionaly};
|
||||
}
|
||||
*/
|
||||
|
||||
for(int y = 0; y < m_size.height; ++y)
|
||||
{
|
||||
for(int x = 0; x < m_size.width; ++x)
|
||||
{
|
||||
points[x + y * m_size.width] = vec2{static_cast<float_t>(x) / static_cast<float_t>(m_size.width), static_cast<float_t>(y) / static_cast<float_t>(m_size.height)};
|
||||
}
|
||||
}
|
||||
|
||||
m_pointsetBuffer = m_alloc.createBuffer(cmdBuf, sizeof(glm::vec2) * points.size(), points.data(),
|
||||
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue