CommandBuffer.DrawRenderer with custom MaterialPropertyBlock?

Hi everyone. I’m trying to make a custom effect that does some manipulation with overlays and stuff with the renderer via command buffer.

I wonder is there a way to apply a MaterialPropertyBlock the same way as CommandBuffer.DrawMesh does but with DrawRenderer?

I’ve tried doing it like this:

 render.SetPropertyBlock(outlineData.ShaderProperties);
_commandBuffer.DrawRenderer(render, _highlightMaterial, 0, (int) outlineData.SortingType);

I’ve also set modified property with an [PerRendererData] attribute in a shader.

But it seems that MaterialPropertyBlock doesn’t affect the command buffer. Am I doing something wrong, or this an intended behaviour?

I know I could feed it via .DrawMesh instead, but then I’ll have to get the shared mesh with the renderer, which is suboptimal.

Ok, so I’ve figured out that CommandBuffer.SetGlobalX can be used instead, just before using .DrawRenderer call.