×

Multi-pass shading

  • US 8,289,325 B2
  • Filed: 10/07/2008
  • Issued: 10/16/2012
  • Est. Priority Date: 10/06/2004
  • Status: Active Grant
First Claim
Patent Images

1. A method for rendering an image with a graphics processor driven by a multi-pass shader program including a descriptor and an input parameter, the method comprising:

  • pre-compiling, before run time, the multi-pass shader program to generate binary execution code for execution by the graphics processor by configuring a binary shader for each value in a predetermined set of values, wherein a variable of each binary shader is fixed at compile time to one of the predetermined values in the set;

    receiving a first parameter of the image, a value of the first parameter being limited to one of the values in the predetermined set of values in the multi-pass shader program;

    executing a first pass of the multi-pass shader program utilizing the binary execution code and the first parameter as the input parameter to obtain a first data value wherein the multi-pass shader program selects, at run-time, the binary shader comprising the binary execution code identified by the value of the first parameter in the first pass;

    binding, at run time, the first data value as the input parameter for a second pass of the multi-pass shader program;

    executing a second pass of the multi-pass shader program utilizing the binary execution code including the bound first data value to obtain a second data value;

    performing an operation on the first data value and the second data value to obtain image rendering data; and

    rendering the image, a portion of the image based upon the image rendering data, and wherein the multi-pass shader program effectuates a photorealistic effect in the portion of the image through the alteration of a color based on the angle and distance of an object with respect to a light source in the portion of the image.

View all claims
  • 4 Assignments
Timeline View
Assignment View
    ×
    ×