# Tag Info

1

It’s kind of inaccurately stated—by comparing the SDF with a linearly increasing radius, the shape that’s being traced out is a cone with a hemisphere on the end, something like this: At any point along the horizontal center line, if the distance to the nearest surface is less than the current test radius, the cone-plus-hemisphere has intersected that ...

1

Given an intersection algorithm like the one you linked which first generates a $t$ value for every plane of the AABB, then computes $t_{min}$ and $t_{max}$ from those, you simply need to figure out which of the six initial values correspond to your final $t_{min}$. There will be two matches if your ray hits an edge, three if it hits a corner. In that case, ...

1

It is cancelled out by the probability density function in the estimator. The pdf in their case is exactly: $\frac{\cos\theta}{\pi}$, which is in the denominator: att = albedo * cos_theta / pdf = albedo * pi. They have absorbed pi in the albedo. Note that there's an update on github to the code, since random_in_unit_sphere() actually generates a \$\cos^3\...

0

Thanks for your help, I fixed it by changing the way i am computing the depth :) const double z_b = texture(depthBuffer, texcoord).x; const vec4 clipSpacePosition = vec4(texcoord * 2.0 - 1.0, z_b, 1.0); vec4 viewSpacePosition = cam.projInverse * clipSpacePosition; viewSpacePosition /= viewSpacePosition.w; float depth = length(viewSpacePosition.xyz);

2

You have a lot of if condition affecting different components of various Point3D. If conditions, especially hard to predict ones are very expensive, instead look into using SIMD to remove most of the conditions by replacing the false branches with identity operations. for example if(!side) { step.x*=-1; sdist.x += delta.x; map.x += step....

1

For a fixed strategy, you can end up consuming a different number of samples depending on your mutation. This can happen for at least two reasons. If your perturbation changes some material along the path to, say, a multi-lobe BSDF, you would need more samples to account for the lobe choice. This would shift everything by the number of extra samples used. If ...

0

Is it reasonable to expect the image of the described scene to be "in grayscale"? If so, do light intensity spectra indeed are required to be multiplied by D65 spectrum? My expectation from a physically-based spectral rendered is that it would compute the physical spectra use the CIE color matching functions to relate that to a quantified color space (eg ...

2

Disclaimer: I've only skimmed through the code. To be honest, the best thing to do would be to use a profiler on your code to identify what actually is costing CPU cycles. Having said that, some operations are more expensive than others - e.g. floating point division and sqrt OR, potentially far more detrimental to performance, cache misses. WRT to the ...

4

Like @lightxbulb said, a light source (i.e. an emissive surface whose L_e term in the rendering equation is greater than zero) can also have a BRDF. People usually do not model light sources really accurately down to the Tungsten filament geometry inside of a glass-enclosed gas chamber for incandescent light bulbs. Such light sources usually are modelled as ...

Top 50 recent answers are included