Adaptive Shader Rendering for GPU Overload in Complex Scenes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Complex applications in terminal devices consume excessive computing resources of the shader computing unit in GPUs, leading to rendering delays and device freezing.
Innovation Solution
A terminal device obtains a target simplified shader based on prestored correspondences, hardware information, and scene complexity to perform graphics rendering, reducing GPU workload and ensuring smooth application execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If a complex shader is used to improve image quality, then the rendering quality is improved, but the computing resources consumed by the shader computing unit increase excessively
Solution Approach 1:
The patent implements dynamic shader management by monitoring GPU occupancy in real-time and adjusting shader complexity adaptively. When high GPU occupancy is detected, the system dynamically switches from complex shaders to simplified shaders, making the shader selection flexible and responsive to current system conditions rather than static.
Solution Approach 2:
The patent changes the complexity parameter of shaders based on system conditions. By maintaining multiple versions of shaders with different complexity levels and switching between them based on GPU occupancy thresholds, the system alters the computational parameters to balance quality and performance.
2Manufacturing precision
If a complex shader is used to draw a realistic scene, then the rendering quality is improved, but the rendering time exceeds the frame time causing device freezing
Solution Approach 1:
The system dynamically adjusts shader complexity based on real-time GPU occupancy monitoring. When the GPU becomes overloaded and rendering time approaches frame time limits, the system automatically switches to simplified shaders to ensure frames are completed within the required time budget, preventing device freezing.
Solution Approach 2:
The patent pre-compiles multiple shader versions with different complexity levels before runtime. This preliminary preparation allows the system to quickly switch between shader variants without compilation overhead during rendering, enabling rapid response to changing performance conditions while maintaining quality when resources are available.
3Device complexity
If the quantity of instructions for running the application increases, then the scene complexity increases, but the GPU cannot complete rendering within one frame time
Solution Approach 1:
The patent segments the shader processing into multiple complexity levels or variants. By dividing the shader functionality into different versions (simplified vs. complex), the system can select appropriate segments based on current GPU load, allowing high-level scene complexity to be maintained in the scene graph while controlling the actual computational complexity executed on the GPU.
Solution Approach 2:
The system applies partial action by using simplified shaders when GPU occupancy is high, accepting reduced rendering quality in exchange for maintaining frame rate. When GPU resources are abundant, the system uses full-complexity shaders to achieve optimal quality, thus applying the appropriate level of action based on system capacity.
Data Source
AI summary
Embodiments of this application relate to the field of image processing technologies, and provide a graphics rendering method, an apparatus, and a storage medium. A terminal device performs graphics rendering for an application by using a target shader. The terminal device obtains a target simplified shader when the terminal device determines that the application is run in a complex scene, where the complex scene is a scene in which a quantity of instructions for running the application is greater than a first preset threshold, and computing resources of the terminal device that are occupied by the target simplified shader are fewer. The terminal device performs graphics rendering for the application in the complex scene by using the target simplified shader. It is ensured that the application of the terminal device can still be run smoothly in the complex scene.


