Clipping geometries in ray-casting
View Patent ↗A computer implemented method for creating a depth range buffer for supporting clipping geometries for ray-casting includes inputting image data, establishing a depth range buffer for specifying a start and an end point of each ray, computing a near depth of the image data corresponding to the start point of each ray, computing a far depth of the image data corresponding to the end point of each ray, clipping the volume by restricting ray-casting within the start and end points of the depth range buffer, and rendering a portion of the image data corresponding to the visible depth range.
1. A computer implemented method for creating a depth range buffer for supporting clipping geometries in ray-casting comprising:
receiving image data to be rendered, the image data comprising an existing depth buffer of blocks;
determining a depth range buffer comprising a first depth buffer for start points a second depth buffer for end points corresponding to the start points,
wherein the start points are each determined to be located at a farther of a near non-empty block and a first clipping geometry and the end points are each determined to be located at a nearer of a far non-empty block, a boundary geometry and a second clipping geometry,
wherein a pair of start and end points define a path of a ray to be cast; and
rendering a clipped view of the image data by restricting a ray-casting within a predetermined depth range defined by the depth range buffer.
2. The computer implemented method of claim 1 , wherein the bounding geometries include information for a non-empty block boundary.
3. The computer implemented method of claim 1 , wherein the first clipping geometry includes information about at least one of a cut-plane, a crop-box, and a near plane.
4. The computer implemented method of claim 1 , wherein the second clipping geometry includes information about at least one of a cut-plane, a crop-box, and a far plane.
5. The computer implemented method of claim 1 , wherein the bounding geometries include information for the existing depth buffer.
6. The computer implemented method of claim 1 , further comprising making a copy of the existing depth buffer and restoring the existing depth buffer after determining the depth range buffer.
7. A non-transitory computer readable storage medium having program instructions stored thereto for implementing the computer implemented method claimed in claim 1 when executed in a digital processing device comprising a graphics processing unit.
8. A computer implemented method for creating a depth range buffer for supporting clipping geometries in ray-casting comprising:
inputting image data;
establishing a depth range buffer comprising a near depth buffer and a far depth buffer specifying start and end points of each ray, respectively;
determining values of the near depth buffer of the image data corresponding to the start point of each ray, wherein the start points are each determined to be located at a farther of a near non-empty block and a first clipping geometry;
determining values of the far depth buffer of the image data corresponding to the end point of each ray, wherein the end points are each determined to be located at a nearer of a far non-empty block, a boundary geometry and a second clipping geometry;
clipping the volume by restricting ray-casting within the start and end points of the depth range buffer; and
rendering a portion of the image data corresponding to the depth range buffer defined by the near depth buffer and the far depth buffer.
9. The computer implemented method of claim 8 , wherein computing the near depth buffer of the image data comprises:
clearing the depth range buffer to zero;
setting a color mask to a first color;
setting a depth function to LESS for determining front faces of the near non-empty blocks of the image data; and
setting the depth function to GREATER for determining front faces of the first clipping geometry of the image data.
10. The computer implemented method of claim 8 , wherein computing the far depth buffer of the image data comprises:
clearing the depth range buffer to a farthest value of the image data;
setting a color mask to a second color;
binding an original depth of the image data as a depth texture;
setting a depth function to GREATER for determining back faces of the far non-empty blocks of the image data; and
setting the depth function to LESS for determining back faces of the boundary geometry of the image data.
11. The computer implemented method of claim 10 , further comprising:
setting the color mask to a third color for validating the far depth; and
render the front faces of the second clipping geometry.
12. The computer implemented method of claim 8 , wherein the first clipping geometry includes information about at least one of a cut-plane, a crop-box, and a near plane.
13. A non-transitory computer readable storage having program instructions stored thereto for implementing the computer implemented method claimed in claim 8 when executed in a digital processing device comprising a graphics processing unit.
14. The computer implemented method of claim 8 , wherein the second clipping geometry includes information about at least one of a cut-plane, a crop-box, and a far plane, wherein the far plane is the boundary geometry.