datatatatata
This commit is contained in:
parent
351e90b541
commit
096679b347
1458 changed files with 1038826 additions and 77 deletions
|
|
@ -344,17 +344,21 @@ void HelloVulkan::createTextureImages(const VkCommandBuffer& cmdBuf, tinygltf::M
|
|||
|
||||
void HelloVulkan::createPointsetImage(const VkCommandBuffer& cmdBuf)
|
||||
{
|
||||
//load pointset instead of generating it
|
||||
std::vector<vec2> points(m_size.height * m_size.width, vec2(0.f));
|
||||
|
||||
|
||||
//generate blue noise points
|
||||
const int npoints = 262144;
|
||||
/*const int npoints = 262144;
|
||||
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;
|
||||
sampler.generateSamples(pointset, npoints);
|
||||
|
||||
utk::write_text_pointset("pointset_262144.txt", pointset);
|
||||
*/
|
||||
//load huge pointset
|
||||
auto pointset = utk::read_text_pointset<long double>("pointset_262144.txt")[0];
|
||||
|
||||
//iterate pointset and fill texture
|
||||
for(int i = 0; i < pointset.Npts(); ++i)
|
||||
|
|
|
|||
|
|
@ -111,6 +111,6 @@ struct GltfShadeMaterial
|
|||
int pbrBaseColorTexture;
|
||||
};
|
||||
|
||||
#define WINDOWSIZE 256
|
||||
#define WINDOWSIZE 512
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ layout(push_constant) uniform _PushConstantRay { PushConstantRay pcRay; };
|
|||
|
||||
void main()
|
||||
{
|
||||
/*
|
||||
const vec2 rayOriginInPix = vec2(gl_LaunchIDEXT.xy) + pointset[255].xy;
|
||||
|
||||
const vec2 rayOriginInPix = vec2(gl_LaunchIDEXT.xy) + pointset[gl_LaunchIDEXT.x + WINDOWSIZE * gl_LaunchIDEXT.y].xy;
|
||||
const vec2 inUV = rayOriginInPix / vec2(gl_LaunchSizeEXT.xy);
|
||||
vec2 d = inUV * 2.0 - 1.0;
|
||||
|
||||
|
|
@ -64,6 +64,6 @@ void main()
|
|||
tMax, // ray max range
|
||||
0// payload (location = 0)
|
||||
);
|
||||
*/
|
||||
imageStore(image, ivec2(gl_LaunchIDEXT.xy), vec4(pointset[gl_LaunchIDEXT.x + WINDOWSIZE * gl_LaunchIDEXT.y].xy, 0.f, 1.0));
|
||||
|
||||
imageStore(image, ivec2(gl_LaunchIDEXT.xy), vec4(prd.hitValue, 1.0));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue