Ivan Belyavtsev
05.02.2022
If a function \(x(t)\) contains no frequencies higher than \(B\) hertz, it is completely determined by giving its ordinates at a series of points spaced \(1/2B\) seconds apart. [1]
Halton sequence is a quasi-random number sequence which actively use for Monte-Carlo simulation. [4]
float2 result{0.0f, 0.0f};
constexpr int base_x = 2;
int index = frame_id + 1;
float inv_base = 1.0f / base_x;
float fraction = inv_base;
while (index > 0)
{
result.x += (index % base_x) * fraction;
index /= base_x;
fraction *= inv_base;
}
constexpr int base_y = 3;
index = frame_id + 1;
inv_base = 1.0f / base_y;
fraction = inv_base;
while (index > 0)
{
result.y += (index % base_y) * fraction;
index /= base_y;
fraction *= inv_base;
}
return result - 0.5f;
[5]
During accumulation you’ll find the intensity of the light is reducing proportional the number of accumulated frames. To compensate the energy lost lets apply a gamma-correction.
\[{GammaRGB}={LinearRGB}^{\frac{1}{\gamma}}\]
[6]
public static Matrix4x4 GetJitteredPerspectiveProjectionMatrix(Camera camera, Vector2 offset)
{
float near = camera.nearClipPlane;
float far = camera.farClipPlane;
float vertical = Mathf.Tan(0.5f * Mathf.Deg2Rad * camera.fieldOfView) * near;
float horizontal = vertical * camera.aspect
offset.x *= horizontal / (0.5f * camera.pixelWidth);
offset.y *= vertical / (0.5f * camera.pixelHeight);
var matrix = camera.projectionMatrix;
matrix[0, 2] += offset.x / horizontal;
matrix[1, 2] += offset.y / vertical;
return matrix;
}
get_jitter
method of raytracer
classhistory
resource in raytracer
classray_generation
method of raytracer
classclosest_hit_shader
for Monte-Carlo light tracingraytracing
tagraytracing
tagDue date: Friday, 18 February 2022, 12:00 AM