Skip to content

warmShaders

warmShaders(app, options?): Promise<ShaderWarmup>

Defined in: sdk/src/render/shaderWarmup.ts:68

Draws the app’s frames out of sight until its shaders have finished compiling, so what is shown first is complete.

The frames advance the world by a tenth of a millisecond each: they exist to make the renderer ask for the shaders the scene needs (a variant is only asked for when something first draws with it), not to play the game. Meant for a loading screen, before the first visible frame.

App

ShaderWarmupOptions = {}

Promise<ShaderWarmup>