Shader auto-simplifying method and system based on rendering instruction flow

US12094049B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-12094049-B2
Application numberUS-202017626786-A
CountryUS
Kind codeB2
Filing dateOct 21, 2020
Priority dateDec 27, 2019
Publication dateSep 17, 2024
Grant dateSep 17, 2024

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A shader auto-simplifying method and system include: obtaining a rendering instruction flow, extracting a target shader from the rendering instruction flow, and creating a simplifying shader differing from the target shader in code only; intercepting a current frame of a rendering instruction with a rendering initiating instruction of the target shader as a particular frame; obtaining time consumed by the simplifying shader by measuring time needed for rendering the particular frame with the simplifying shader; obtaining error(s) of the simplifying shader by measuring a pixel difference value between a rendering frame drawn by the simplifying shader and the particular frame when a rendering instruction corresponding to the particular frame is executed; and screening an optimal simplifying shader according to the time consumed by the simplifying shader and the error of the simplifying shader.

First claim

Opening claim text (preview).

What is claimed is: 1. A shader auto-simplifying method based on a rendering instruction flow, wherein the method comprises: obtaining a rendering instruction flow, extracting a target shader from the rendering instruction flow, and creating a simplifying shader differing from the target shader in code only; intercepting a current frame of a rendering instruction comprising a rendering initiating instruction of the target shader as a particular frame; obtaining time consumed by the simplifying shader by measuring time needed for rendering the particular frame with the simplifying shader; obtaining error(s) of the simplifying shader by measuring a pixel difference value between a rendering frame drawn by the simplifying shader and the particular frame when a rendering instruction corresponding to the particular frame is executed; and screening an optimal simplifying shader according to the time consumed by the simplifying shader and the error of the simplifying shader; wherein the obtaining process of the particular frame comprises: upon executing the rendering instruction flow, employing an instruction of an exchange buffer area to distinguish an adjacent frame and obtaining a rendering instruction set corresponding to a current frame; and if the rendering instruction set corresponding to the current frame comprises a rendering initiating instruction using the target shader, taking the current frame as a particular frame. 2. The shader auto-simplifying method based on a rendering instruction flow as claimed in claim 1 , wherein the creating process of a simplifying shader comprises: simplifying codes of the target shader and generating codes of a simplifying shader; re-executing an obtained rendering instruction flow; recording all rendering instructions with the target shader as an object; after finishing creating the target shader, creating the simplifying shader according to the code of the simplifying shader; and with the simplifying shader as an object, executing the recorded rendering instruction with the target shader as the object so as to create the simplifying shader differing from the target shader in code only. 3. The shader auto-simplifying method based on a rendering instruction flow as claimed in claim 1 , wherein the obtaining process of the time consumed by the simplifying shader comprises: repeating execution of the rendering instruction corresponding to the particular frame; upon execution, replacing the target shader with the simplifying shader and inserting a time query instruction before and after the rendering initiating instruction of the simplifying shader, and obtaining the time consumed by the simplifying shader according to a result of the time query instruction. 4. The shader auto-simplifying method based on a rendering instruction flow as claimed in claim 1 , wherein the obtaining process of the error of the simplifying shader comprises: repeating execution of the rendering instruction corresponding to the particular frame; upon execution, replacing the target shader with the simplifying shader, and obtaining a rendering frame obtained upon end of execution of the rendering instruction so as to take a pixel difference value between the rendering frame and the particular frame as the error of the simplifying shader. 5. The shader auto-simplifying method based on a rendering instruction flow as claimed in claim 1 , wherein the screening an optimal simplifying shader according to the time consumed by the simplifying shader and the error of the simplifying shader comprises: comparing the time consumed by the simplifying shader with the time consumed by the target shader, thereby obtaining a decreasing ratio of the time consumed by the simplifying shader relative to the time consumed by the target shader; and screening an optimal simplifying shader according to principles of Pareto Optimality according to error(s) of the decreasing ratio of the time consumed with the simplifying shader. 6. The shader auto-simplifying method based on a rendering instruction flow as claimed in claim 5 , wherein the obtaining process of the time consumed by the target shader comprises: repeating execution of the rendering instruction corresponding to the particular frame; upon execution, inserting a time query instruction before and after a rendering initiating instruction of the target shader, and obtaining the time consumed by the simplifying shader according to a result of the time query instructions. 7. A shader auto-simplifying system based on a rendering instruction flow, comprising a client and a service side in mutual communication, wherein the service side captures a rendering instruction flow called upon running of a graphical program and stores the rendering instruction flow as a file upon end of the graphical program; the client obtains a captured rendering flow instruction set from the service side and selects a shader from the rendering instruction flow set as a target shader, generates a simplifying shader corresponding to the target shader and transmits a request for calculating time consumed by the simplifying shader and error(s) of the simplifying shader to the service side; according to the request for calculating time consumed by the simplifying shader and error(s) of the simplifying shader, the service side obtains time consumed by the simplifying shader by specifically measuring time needed for rendering a particular frame with the simplifying shader, obtains error(s) of the simplifying shader by measuring a pixel difference value between a rendering frame drawn by the simplifying shader and the particular frame when the rendering instruction corresponding to the particular frame is executed, and feeds a calculating result back to the client; and the client screens an optimal simplifying shader according to the calculating result. 8. The shader auto-simplifying system based on a rendering instruction flow as claimed in claim 7 , wherein the calculating time consumed by the simplifying shader and error(s) of the simplifying shader comprises: intercepting a current frame of the rendering instruction comprising a rendering initiating instruction of the target shader as a particular frame; obtaining time consumed by the simplifying shader by measuring time needed for rendering the particular frame with the simplifying shader; and obtaining error(s) of the simplifying shader by measuring a pixel difference value between a rendering frame drawn by the simplifying shader and the particular frame when the rendering instruction corresponding to the particular frame is executed. 9. The shader auto-simplifying system based on a rendering instruction flow as claimed in claim 7 , wherein the screening an optimal simplifying shader according to a calculating result comprises: comparing the time consumed by the simplifying shader with the time consumed by the target shader, thereby obtaining a decreasing ratio of the time consumed by the simplifying shader relative to the time consumed by the target shader; and screening an optimal simplifying shader according to principles of Pareto Optimality according to error(s) of the decreasing ratio of the time consumed with the simplifying shader.

Assignees

Inventors

Classifications

  • Shading · CPC title

  • G06T1/20Primary

    Processor architectures; Processor configuration, e.g. pipelining · CPC title

  • Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching · CPC title

  • G06T15/005Primary

    General purpose rendering architectures · CPC title

  • Three-dimensional [3D] image rendering · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US12094049B2 cover?
A shader auto-simplifying method and system include: obtaining a rendering instruction flow, extracting a target shader from the rendering instruction flow, and creating a simplifying shader differing from the target shader in code only; intercepting a current frame of a rendering instruction with a rendering initiating instruction of the target shader as a particular frame; obtaining time cons…
Who is the assignee on this patent?
Univ Zhejiang
What technology area does this patent fall under?
Primary CPC classification G06T1/20. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Sep 17 2024 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).