0
$\begingroup$

I am learning how to voxelize a scene using GPU. In OpenGL Insights, there is a algorithm doing this on page 6. However, I am confused on the last step: Convert 2D fragment to 3d voxel. In the book, it is said:

"For each 2D fragment, the voxels actually intersected by the triangle are computed within the fragment shader, based on position and depth information interpolated from vertices’ values at the pixel center, as well as screen-space derivatives provided by GLSL (dFdx()/dFdy())."

Could anyone help me understand the paragraph above?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.