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

Decouple shader

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

Use Case

Currently we use uber shader to do rendering. In uber shader, it contains static global illumination code and skinning animation code,which are fundamentally incompatible. Current usage will increase uniform/descriptor usage, since these two feature will use different uniforms/textures. We should break the shader to reduce resource usages.

Problem Description

number of uniform/descriptor exceeds platform requirement.

Proposed Solution

Split uber shader into static and animation ones.

How it works

By breaking uniforms/descriptors into two groups, each group will have fewer uniforms/descriptors.

Alternatives Considered

Refactor PerInstance descriptor set, but cannot fundamentally solve this problem.

Additional Information

No response

star-e avatar Jul 31 '23 06:07 star-e