cocos-engine
cocos-engine copied to clipboard
Decouple shader
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