Reducing data stored in a deep-framebuffer
AssigneeLucasfilm Entertainment Company Ltd.
InventorsCharlie A. Kilpatrick, Brian W. Smith
Life of this patent
Estimating the term…
Abstract
The subject matter of this specification can be embodied in, among other things, a method that includes generating intermediate values from an evaluation of one or more static expressions within shader programming code that is configured to modify an appearance of an image, compressing the intermediate values based on a determination of which intermediate values are duplicative, and storing the compressed intermediate values in a buffer accessible to an image rendering application.
Claims20
A computer-implemented method comprising:
- receiving, in a computer, shader programming code that is configured to modify an appearance of an image, the shader programming code when received including a plurality of shader expressions;
- receiving input that identifies at least a first shader expression as a static expression to be evaluated as part of executing the shader programming code;
- identifying a second shader expression as a dynamic expression;
- generating intermediate values from an evaluation of the first static expression;
- determining that the generated intermediate values are uniform by identifying that the intermediate values are within a predetermined level of tolerance of each other;
- associating the first static expression with a single representation of the uniform intermediate values, the associating providing that the single representation will be used in place of the first static expression when the shader programming code is executed;
- storing the single representation of the uniform intermediate values in a buffer accessible to an image rendering application configured to execute the shader programming code;
- accessing, by the image rendering application, the uniform intermediate values by using the stored single representation;
- evaluating the dynamic expression using the accessed uniform intermediate values;
- and
- generating a final image by the image rendering application by using the evaluated dynamic expression and the accessed uniform intermediate values.
A computer-implemented method comprising:
- receiving in a computer shader programming code that is configured to modify an appearance of an image, the shader programming code when received including a plurality of shader expressions;
- receiving input that identifies at least a first and a second of the shader expressions as static expressions to be evaluated as part of executing the shader programming code;
- identifying a third shader expression as a dynamic expression;
- determining which intermediate values generated from an evaluation of the first static expression and an evaluation of the second static expression are duplicative by identifying a first plurality of intermediate values corresponding to the first static expression and a second plurality of intermediate values corresponding to the second static expression, wherein each of the first plurality of intermediate values are within a predetermined level of tolerance of each of the corresponding second plurality of intermediate values;
- associating the first and second static expressions with a single representation of the duplicative intermediate values, the associating providing that the single representation will be used in place of the first and second static expressions when the shader programming code is executed;
- storing the single representation of the duplicative intermediate values in a buffer accessible to an image rendering application configured to execute the shader programming code;
- accessing by the image rendering application the intermediate values and the stored single representation of the duplicative values;
- evaluating the dynamic expression using the accessed intermediate and the stored single representation of the duplicative intermediate values and
- generating a final image by the image rendering application by combining the evaluated dynamic expression and the accessed stored single representation.
A system comprising:
- at least one processor;
- a buffer memory;
- program modules configured to be executed on the at least one processor, the program modules comprising:
- an expression evaluator capable of:
- receiving shader programming code that is configured to modify an appearance of an image, the shader programming code when received including a plurality of shader expressions;
- receiving input that identifies at least a first and a second static expressions to be evaluated as part of executing the shader programming code;
- and
- generating intermediate values from an evaluation of the first static expression and an evaluation of the second static expression;
- a value comparison module capable of:
- identifying duplicative intermediate values by identifying a first plurality of intermediate values corresponding to the first static expression and a second plurality of intermediate values corresponding to at least the second static expression, wherein each of the first plurality of intermediate values are within a predetermined level of tolerance of each of the corresponding second plurality of intermediate values;
- and
- storing the duplicative intermediate values to the buffer memory, wherein the buffer memory is accessible to an image rendering application configured to execute the shader programming code;
- and
- a value compression module capable of:
- associating the first and second static expressions with a single representation, the associating providing that a single representation will be used in place of the first and second static expressions when the shader programming code is executed;
- and
- outputting the single representation to the buffer memory;
- and
- a processing unit capable of:
- accessing from the buffer memory the intermediate values and the stored single representation;
- evaluating the dynamic expression using the accessed intermediate values and the stored single representation;
- and
- generating a final image by the image rendering application by combining the evaluated dynamic expression and the accessed single representation.
A computer-implemented method comprising:
- receiving, in a computer, shader programming code that is configured to modify an appearance of an image, the shader programming code when received including a plurality of shader expressions;
- receiving input that identifies a first and a second expression included in a shader application as being static expressions, the first and second expressions being static during modification of a set of parameters for the shader application, the first and second expressions being included in the shader programming code when received;
- receiving in the shader application a third expression, the third expression being a dynamic expression;
- generating, based on an evaluation of the first expression and an evaluation of the second expression, values associated with a plurality of shading samples, wherein the values associated with a plurality of shading samples are the same during multiple image re-renderings by an image rendering application using the set of parameters;
- identifying a common plurality of generated values within the generated values comprising a first plurality of intermediate values corresponding to the first expression and a second plurality of intermediate values corresponding to the second expression, wherein each of the first plurality of intermediate values are within a predetermined level of tolerance of each of the corresponding second plurality of intermediate values;
- associating the first and second expressions with a single representation of the common plurality of generated values, the associating providing that a single representation will be used in place of the first and second expressions when the shader programming code is executed;
- and
- storing the single representation of the common plurality of generated values in a framebuffer accessible to the image rendering application configured to execute the shader programming code;
- accessing by the image rendering application the stored single representation of the common plurality of generated values;
- evaluating the dynamic expression using the set of parameters and the accessed stored single representation of the common plurality of generated values;
- and
- generating a final image by the image rendering application by combining the evaluated dynamic expression and the accessed stored single representation of the common plurality of generated values.
Dependencies are inferred from the claim text.