New answers tagged

1

Everything in this code functions as intended, until I try to translate the entire grid (grid lines) to the center of the screen by adding v_Resolution.x / 2 to uv.x. Not sure what your intention is here since the Shadertoy example you referenced generates an infinite grid. So maybe you can clarify that. However, I think I can help you with this problem: .....


1

This code below can cause an 8bit overflow. auto traceRay = [&](const point_t O, const vec3d D, const int min, const int max) -> color_t { ... return color_t{uint8_t(closest_sphere.color.r * total_light), uint8_t(closest_sphere.color.g * total_light), uint8_t(closest_sphere.color.b * total_light), 255}; Here ...


1

It looks like the parameters to your camera class are not correct const int img_ratio = 2; ... Camera<float> cam1(20.0f, img_ratio, Point3<float>(0.0f, 0.0f, 0.0f), Point3<float>(0.0f, 0.0f, -1.0f), Vec3<float>(0.0f, 1.0f, 0.0f)); In your code you set img_ratio to 2, I would expect it should be something like img_width/img_height (...


0

All the previous answers/comments were correct. The weird thing about my case was the symlinks of the libraries in the build directory were not valid and were not pointing to the right files. The output of ls -lh /home/Warrior/Desktop/pathtracer/oidn/build was as follow: total 160K drwxrwxr-x 4 amir amir 4.0K Feb 4 00:09 apps -rw-rw-r-- 1 amir amir 19K Feb ...


0

So you have a series of points and, at each point, a supplied derivative? Is a piecewise cubic sufficient or does it need higher derivative continuity? If the former is ok, then Cubic Hermite Splines will do the job. (If you need, they can be trivially mapped into cubic Beziers)


Top 50 recent answers are included