Shader Precaching via Remote Compilation for Game Stutter Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The long loading times and in-game stuttering issues in PC video games due to the need for local compilation of shaders on client machines with varying hardware configurations, which can lead to inefficient resource usage and poor gaming performance.

Innovation Solution

A system for precaching compiled shader code on client machines by reporting hardware configurations and shader information to a remote computing system, allowing for the redistribution of precompiled shader code among client machines with matching configurations, thereby reducing the need for local compilation during gameplay.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If shaders are compiled locally on the client machine when the video game is loading, then the shaders are customized for the specific hardware configuration, but the initial loading time becomes undesirably long

Engineering Contradiction:
Improveshader compatibility with hardwareVSAvoidinitial loading time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-compiling shaders on a remote system before the client needs them. The remote system compiles shaders in advance based on reported hardware configurations, and stores these pre-compiled shaders for later distribution to clients, eliminating the need for time-consuming local compilation during game loading.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary remote system that acts as a mediator between shader compilation and client execution. This remote system performs the compilation work centrally, then distributes the compiled shaders to clients, separating the compilation function from the client machine and resolving the conflict between customization and speed.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If shaders are compiled during gameplay when new materials are encountered, then the shaders are compiled on-demand, but in-game stuttering or hitching occurs due to compilation time

Engineering Contradiction:
Improveshader compilation efficiencyVSAvoidframe rendering speed
Core Design Contradiction:
ProductivityVSSpeed

Solution Approach 1:

The patent eliminates in-game compilation by performing the compilation action beforehand on the remote system. Shaders are pre-compiled for various hardware configurations before the client needs them, so during gameplay the client simply downloads and executes pre-compiled shaders without any compilation overhead that would cause stuttering.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts the shader compilation function from the client machine's real-time execution environment and relocates it to a remote system. This separation removes the harmful effect of compilation-time frame drops from the gameplay experience, as compilation occurs independently of the real-time rendering loop.

Inventive Principle:
Principle #2Taking out (Extraction)

3Adaptability or versatility

If byte code shaders are distributed to customers for runtime compilation, then the game can execute on PC platforms with different hardware configurations, but the compilation process consumes significant local resources

Engineering Contradiction:
Improvehardware compatibilityVSAvoidlocal compilation resource usage
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The remote system serves as an intermediary that handles the resource-intensive compilation process centrally. Instead of each client machine consuming its own local resources for compilation, the remote system performs compilation using its own resources, then distributes the results to clients who have minimal resource usage during shader acquisition.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent uses copying by creating pre-compiled shader copies for different hardware configurations on the remote system. Once compiled for a particular hardware configuration, the resulting machine code can be copied and distributed to multiple clients with identical hardware, eliminating the need for each client to perform independent compilation and reducing overall resource consumption.

Inventive Principle:
Principle #26Copying

Data Source

PatentEP3735679B1Distributing shaders between client machines for precaching
Publication Date: 2024.04.17 VALVE CORPORATION
  • EP3735679B1 patent drawingFigure 1
  • EP3735679B1 patent drawingFigure 2
  • EP3735679B1 patent drawingFigure 3

AI summary

Client machines are configured to compile shaders during execution of a program (e.g., a video game) that renders graphics on a display. These client machines may upload information - including a hardware configuration of the client machine, an application identifier (ID) of the program, and a set of shader IDs for compiled shaders - to a remote computing system, which catalogues the shader IDs, selectively requests compiled shader code from one or more of the client machines, and selectively prepares the compiled shader code for redistribution. Thereafter, a requesting client machine with a matching hardware configuration may receive compiled shader code from the remote system for a particular program, and may precache the compiled shader code for use during program execution.