cocos-engine icon indicating copy to clipboard operation
cocos-engine copied to clipboard

add shader subset compiling

Open star-e opened this issue 2 years ago • 0 comments

Use Case

When loading shader, we can provide combinations of macros in order to control the number of shader variant need compiling.

Problem Description

Currently, we cannot control the shaders to be compiled. Some shader variants are compiled but never used. This increases loading time and consumes more power on mobile platform.

Proposed Solution

gfx provides interface to control shader compiling. User can provide the subset of shader variants to be compiled.

How it works

No response

Alternatives Considered

Delay shader compilation only when it is used.

Additional Information

No response

star-e avatar Aug 11 '22 09:08 star-e