Graphics processing employing cube map texturing
AssigneeSamsung Electronics Co., Ltd.
InventorSeok Kang
Life of this patent
Estimating the term…
Abstract
Provided are a method and an apparatus for transforming coordinates of pixels representing boundary points of an object on a cube map, when pixels respectively correspond to different faces of a cube map. Distances between the boundary pixels may be calculated by using the transformed coordinates. Based on the on the calculated distances, a level of detail (LOD) for texturing the cube map of the pixels may be determined.
Claims12
A method of determining a level of detail (LOD) for texturing a cube map, the method comprising:
- determining coordinates of first and second pixels of a screen space, the first and second pixels being mapped to respective first and second cube map pixels of the cube map located at first cube map coordinates and second cube map coordinates, respectively;
- transforming the coordinates of the second cube map pixel when the first and second pixels respectively project to first and second faces of the cube map, and designating the first face as a reference face in which cube map pixel coordinates are defined with an “s” axis component and a “t” axis component, wherein the t axis is orthogonal to the s axis;
- calculating derivatives (∂s/∂x)p01 and (∂t/∂x)p01 of the first pixel with respect to the second pixel, by calculating component distances between the first cube map pixel and the second cube map pixel along the s axis and along the t axis, respectively, using the transformed coordinate, wherein “x” denotes a coordinate axis of the screen space and p01 denotes a relationship between the first pixel and the second pixel;
- calculating derivatives (∂s/∂x)p02 and (∂t/∂x)p02 of the first pixel with respect to a third pixel of the screen space, wherein p02 denotes a relationship between the first pixel and the third pixel, by calculating component distances between the first cube map pixel and a third cube map pixel to which the third pixel projects, along the s axis and along the t axis, respectively;
- and
- determining, based on the calculated derivatives, an LOD for texturing the cube map according to:
- λ=log2[MAX{√{square root over ((∂s/∂x)p012+(∂t/∂r)p012)},√{square root over ((∂s/∂x)p022+(∂t/∂x)p022)}}]
- where λ is a value of the LOD.
An apparatus for determining a level of detail (LOD) for texturing a cube map, the apparatus comprising:
- memory storing computer-executable instructions;
- and
- a processor configured to execute the computer-executable instructions to:
- determine coordinates of first and second pixels of a screen space, the first and second pixels being mapped to respective first and second cube map pixels of the cube map located at first cube map coordinates and second cube map coordinates, respectively;
- transform the coordinates of the second cube map pixel when the first and second pixels respectively project to first and second faces of the cube map, and designating the first face as a reference face in which cube map pixel coordinates are defined with an “s” axis component and a “t” axis component, wherein the t axis is orthogonal to the s axis;
- calculate derivatives (∂s/∂x)p01 and (∂t/∂x)p01 of the first pixel with respect to the second pixel, by calculating component distances between the first cube map pixel and the second cube map pixel along the s axis and along the t axis, respectively, using the transformed coordinate, wherein “x” denotes a coordinate axis of the screen space and p01 denotes a relationship between the first pixel and the second pixel:
- calculate derivatives (∂s/∂x)p02 and (∂t/∂x)p02 of the first pixel with respect to a third pixel of the screen space, wherein p02 denotes a relationship between the first pixel and the third pixel, by calculating component distances between the first cube map pixel and a third cube map pixel to which the third pixel projects, along the s axis and along the t axis, respectively;
- and
- determine, based on the calculated derivatives, an LOD for texturing the cube map according to:
- λ=log2[MAX{√{square root over ((∂s/∂x)p012+(∂t/∂x)p012)},√{square root over ((∂s/∂x)p022+(∂t/∂x)p022}])}
- where λ is a value of the LOD.
A non-transitory computer-readable recording medium having recorded thereon a program which, when executed by a processor of a graphics processing device, implements a method of determining a level of detail (LOD) for texturing a cube map, wherein the method includes:
- determining coordinates of first and second pixels of a screen space, the first and second pixels being mapped to respective first and second cube map pixels of the cube map located at first cube map coordinates and second cube map coordinates, respectively;
- transforming the coordinates of the second cube map pixel when the first and second pixels respectively project to first and second faces of the cube map, and designating the first face as a reference face in which cube map pixel coordinates are defined with an “s” axis component and a “t” axis component, wherein the t axis is orthogonal to the s axis;
- calculating derivatives (∂s/∂x)p01 and (∂t/∂x)p01 of the first pixel with respect to the second pixel, by calculating component distances between the first cube map pixel and the second cube map pixel along the s axis and along the t axis, respectively, using the transformed coordinate, wherein “x” coordinate axis of the screen space and p01 denotes a relationship between the first pixel and the second pixel:
- calculating derivatives (∂s/∂x)p02 and (∂t/∂x)p02 of the first pixel with resect to a third pixel of the screen space, wherein p02 denotes a relationship between the first pixel and the third pixel, by calculating component distances between the first cube map pixel and a third cube map pixel to which the third pixel projects, along the s axis and along the t axis, respectively;
- and
- determining, based on the calculated derivatives, an LOD for texturing the cube map according to:
- λ=log2[MAX{√{square root over ((∂s/∂x)p012+(∂t/∂x)p012)},√{square root over ((∂s/∂x)p022+(∂t/∂x)p022}])}
- where λ is a value of the LOD.
Dependencies are inferred from the claim text.