Per-fragment control for writing an output buffer
AssigneeNVIDIA Corporation
InventorsRui M. Bastos, John Erik Lindholm, Matthew N. Papakipos
Life of this patent
Estimating the term…
Abstract
A fragment program may configure a fragment shader to compute a destination position for a fragment, where the destination position is independent of a position computed for the fragment during rasterization of a primitive. The destination position may be computed based on fragment parameters such as color, depth, and transparency. A raster operation unit writes processed fragment data to the destination position. Furthermore, the fragment program may configure the fragment shader to compute a per-fragment stencil operation for use by the raster operation unit during stencil buffering.
Claims28
A method for determining a destination position corresponding to a fragment on a per-fragment basis, comprising:
- rasterizing a primitive to produce a first destination position;
- receiving the first destination position corresponding to the fragment that is independent of vertex positions of a primitive including the fragment;
- shading the fragment;
- computing a second destination position corresponding to the fragment;
- and
- storing output data for the fragment in an output buffer at a location corresponding to the second destination position.
A method for providing per-fragment operation extension using a fragment program, comprising:
- rasterizing a primitive to produce a first destination position;
- determining a per-fragment operation value using the fragment program, wherein the fragment program includes a step of receiving the first destination position corresponding to a fragment that is independent of vertex positions of a primitive including the fragment;
- reading fragment data from a location in an output buffer;
- performing a per-fragment operation specified by the per-fragment operation value on the fragment data to produce output data;
- and
- storing the output data stored in the location in the output buffer.
A fragment processing pipeline configured to produce shaded fragment data for an output buffer, comprising:
- a fragment shader configured to process a fragment to produce the shaded fragment data and compute a destination position for the fragment that is independent of a vertex position of a primitive including the fragment;
- and
- a raster operation unit configured to write the shaded fragment data to a location in the output buffer specified by the destination position.
Dependencies are inferred from the claim text.