IP Library Granted Patent US 9,754,407
Granted Patent B2
US 9,754,407 · App. 14/645,327 · Granted Sep 5, 2017

System, method, and computer program product for shading using a dynamic object-space grid

Inventors: Anjul Patney (Kirkland, WA); Eric B. Enderton (Berkeley, CA); Eric B. Lum (San Jose, CA); Marco Salvi (Kirkland, WA); Christopher Ryan Wyman (Redmond, WA); Yubo Zhang (Santa Clara, CA); Yong He (Pittsburgh, PA); G. Evan Hart, Jr. (Bristow, VA); Kayvon Fatahalian (Pittsburgh, PA); Yury Uralsky (Santa Clara, CA); Henry Packard Moreton (Woodside, CA); Aaron Eliot Lefohn (Kirkland, WA)
Assignee: NVIDIA Corporation
G06T15/80G06T17/10G06T17/20G06T17/205G06T2200/04G06T2210/36
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,754,407
App. No.
14/645,327
Granted
Sep 5, 2017
Kind
B2
Abstract

A system, method, and computer program product are provided for shading using a dynamic object-space grid. An object defined by triangle primitives in a three-dimensional (3D) space that is specific to the object is received and an object-space shading grid is defined for a first triangle primitive of the triangle primitives based on coordinates of the first triangle primitive in the 3D space. A shader program is executed by a processing pipeline to compute a shaded value at a point on the object-space shading grid for the first triangle primitive.

Claims (41)

1. A method comprising:

receiving an object defined by a plurality of triangle primitives in a three-dimensional (3D) space that is specific to the object;

defining an object-space shading grid for at least one of the plurality of triangle primitives based on coordinates at vertices of the at least one triangle primitive in the 3D space,

wherein a shape of an object-space shading element corresponds to a shape of the at least one triangle primitive, wherein the object-space shading grid comprises at least one object-space shading element; and

executing, by a processing pipeline, a shader program to compute a shaded value at a point on the object-space shading grid for a first triangle primitive.

2. The method of claim 1 , wherein the vertices comprise a first vertex, a second vertex, and a third vertex that define the first triangle primitive and the point corresponds to the first vertex.

3. The method of claim 2 , further comprising:

executing, by the processing pipeline, the shader program to compute a second shaded value at a second point that corresponds to the second vertex; and

executing, by the processing pipeline, the shader program to compute a third shaded value at a third point that corresponds to the third vertex.

4. The method of claim 3 , further comprising computing a shaded sample at a location within the first triangle by interpolating the first, second, and third shaded values.

5. The method of claim 1 , wherein the object-space shading grid comprises an additional level comprising only vertex positions of four sub-triangles produced by bisecting each edge of the first triangle primitive.

6. The method of claim 5 , wherein the additional level of the object-space shading grid is dynamically generated during execution of the shader program.

7. The method of claim 1 , wherein the object-space shading grid is mipmapped such that each higher resolution mip level is generated by subdividing a lower resolution mip level into substantially congruent sub-triangles within the first triangle primitive.

8. The method of claim 7 , further comprising:

transforming a screen-space pixel into the 3D space that is specific to the object to generate a footprint; and

identifying a first mip level of the mipmapped object-space shading grid that includes a sub-triangle having an area that most closely approximates an area of the footprint.

9. The method of claim 8 , further comprising identifying a second mip level of the mipmapped object-space shading grid that includes a sub-triangle having an area that closely approximates the area of the footprint.

10. The method of claim 9 , further comprising executing the shader program to compute a second shaded value at a second point on the object-space shading grid for the sub-triangle.

11. The method of claim 10 , wherein the sub-triangle is defined by the point, the second point on the object-space shading grid, and a third point on the object-space shading grid.

12. The method of claim 11 , further comprising:

executing the shader program to compute a third shaded value at the third point for the sub-triangle; and

computing a shaded sample at a sample location within the sub-triangle based on the shaded value, the second shaded value, and the third shaded value.

13. The method of claim 1 , further comprising:

transforming a screen-space pixel into the 3D space that is specific to the object to generate a footprint defined by at least a first sample location; and

determining that a sub-triangle within the first triangle encloses the first sample location.

14. The method of claim 13 , further comprising, executing the shader program to compute a second shaded value at a second point on the object-space shading grid that corresponds to a first vertex of the sub-triangle.

15. The method of claim 1 , further comprising updating the object-space grid in response to a change in a shape of the first triangle primitive.

16. The method of claim 1 , further comprising computing a dynamic shading rate for the first triangle primitive that varies within the first triangle primitive and is used to sample the object-space shading grid for the first triangle primitive.

17. A system comprising:

a processing pipeline that is configured to:

receive an object defined by a plurality of triangle primitives in a three-dimensional (3D) space that is specific to the object;

define an object-space shading grid for at least one of the plurality of triangle primitives based on coordinates at vertices of the at least one triangle primitive in the 3D space,

wherein a shape of an object-space shading element corresponds to a shape of the at least one triangle primitive, wherein the object-space shading grid comprises at least one object-space shading element; and

execute a shader program to compute a shaded value at a point on the object-space shading grid for a first triangle primitive.

18. The system of claim 17 , wherein the object-space shading grid is mipmapped such that each higher resolution mip level is generated by subdividing a lower resolution mip level into substantially congruent sub-triangles within the first triangle primitive.

19. The system of claim 17 , wherein the object-space shading grid comprises an additional level comprising only vertex positions of four sub-triangles produced by bisecting each edge of the first triangle primitive.

20. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, causes the processor to perform steps comprising:

receiving an object defined by a plurality of triangle primitives in a three-dimensional (3D) space that is specific to the object;

defining an object-space shading grid for at least one of the plurality of triangle primitives based on coordinates at vertices of the at least one triangle primitive in the 3D space,

wherein a shape of an object-space shading element corresponds to a shape of the at least one triangle primitive, wherein the object-space shading grid comprises at least one object-space shading element; and

executing, by a processing pipeline, a shader program to compute a shaded value at a point on the object-space shading grid for a first triangle primitive.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 11, 2015
From: PATNEY, ANJUL; ENDERTON, ERIC B.; LUM, ERIC B.; SALVI, MARCO; WYMAN, CHRISTOPHER RYAN; ZHANG, YUBO; HE, YONG; HART, G. EVAN, JR.; FATAHALIAN, KAYVON; URALSKY, YURY; MORETON, HENRY PACKARD; LEFOHN, AARON ELIOT
To: NVIDIA CORPORATION
Reel/Frame 035891/0947 →
Continuity (2)
Provisional Application 62036552 · Aug 12, 2014
Related Publication 20160048999A1 · Feb 18, 2016