Simply skip batch for custom program, see #245

This commit is contained in:
halx99 2020-10-23 10:26:45 +08:00
parent 4a93071ab0
commit f50edaa18c
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,10 @@ void TrianglesCommand::init(float globalOrder, Texture2D* texture, const BlendFu
_texture = texture->getBackendTexture(); _texture = texture->getBackendTexture();
_blendType = blendType; _blendType = blendType;
//since it would be too expensive to check the uniforms, simplify enable batching for built-in program.
if (_programType == backend::ProgramType::CUSTOM_PROGRAM)
setSkipBatching(true);
//TODO: minggo set it in Node? //TODO: minggo set it in Node?
auto& blendDescriptor = _pipelineDescriptor.blendDescriptor; auto& blendDescriptor = _pipelineDescriptor.blendDescriptor;
blendDescriptor.blendEnabled = true; blendDescriptor.blendEnabled = true;