Optimized computation of perspective interpolants
AssigneeSamsung Electronics Co., Ltd.
InventorsDerek Lentz, Yevgeniy Urdenko
Life of this patent
Estimating the term…
Abstract
A graphics pipeline may reduce the number of times when reciprocal, multiply or add computations are used for interpolation computations when though the GPU hardware has been programmed or set to perform a linear-perspective interpolation by determining whether a homogeneous coordinate of each vertex of the primitive is within a predetermined threshold of 1 when a linear-perspective interpolation technique has been specified in a shader program, and determining one or more attributes of the element using a linear interpolation technique based on the homogeneous coordinate of each vertex of the primitive being within a predetermined threshold of 1.
Claims20
A method to interpolate one or more attributes of an element of a primitive being rendered in a graphics pipeline, the method comprising:
- determining that a homogeneous coordinate of the element is within a predetermined threshold of 1 based on a linear-perspective interpolation technique having been specified for rendering the primitive;
- interpolating the attributes of the element using a linear-interpolation technique based on the homogeneous coordinate of the element being within a predetermined threshold of 1;
- and
- interpolating the attributes of the element using a linear-perspective interpolation technique based on the homogeneous coordinate of the element being outside of the predetermined threshold of 1.
A graphics pipeline stage, comprising:
- an input that receives one or more attributes of a primitive;
- a comparator that compares a value of a homogeneous coordinate of the attributes of the primitive to 1 to determine whether the value of the homogeneous coordinate is within a predetermined threshold of 1 based on a linear-perspective interpolation technique having been specified for rendering the primitive;
- and
- an interpolator that interpolates the attributes of the primitive using a linear-interpolation technique based on the value of the homogeneous coordinate being determined to be within the predetermined threshold of 1, and that interpolates the attributes of the primitive using the linear-perspective interpolation technique based on the value of the homogeneous coordinate being determined to be outside of the predetermined threshold of 1.
A graphics processing unit, comprising:
- a graphics pipeline stage comprising:
- an input that receives one or more attributes of a primitive;
- a comparator that determines whether a value of a homogeneous coordinate of a primitive is a constant that is not equal to 1 based on a linear-perspective interpolation technique having been specified for rendering the primitive;
- and
- an interpolator that interpolates the attributes of the primitive using a linear-interpolation technique based on the value of the homogeneous coordinate being determined to be a constant that is not equal to 1, and that interpolates the attributes of the primitive using the linear-perspective interpolation technique based on the value of the homogeneous coordinate being other than a constant that is not equal to 1;
- and
- a shader that receives an output of the interpolator and renders the primitive.
Dependencies are inferred from the claim text.