ECS MaterialProperty _BaseMap_ST seems not to apply

I’m attempting to update the tiling of a material’s texture from the code in ECS. But, applying this MaterialProperty component to an entity and updating it’s value provides no change to the material.

Steps:

  1. Start runtime
  2. Component does get added to the entity correctly
  3. Value of the added component is correct
  4. Value has no affect on the actual rendering even when manipulating at runtime in the inspector

Component

[MaterialProperty("_BaseMap_ST")]
public struct MaterialPropertyBaseMapST : IComponentData
{
    public float4 Value;
}

Implementation

_entityManager.AddComponentData(sidewalkEntity, new MaterialPropertyBaseMapST
{
    Value = new float4(1, scale.z / 200, 0, 0) // xy is scale, zw is offset
});

Based on my research, I am using the correct property for URP. Any advice would be appreciated.

Render pipeline: URP
Unity version: 6000.0.25f1
Entities version: 1.3.5
Entities Graphics version: 1.3.2

Most likely the shader you are using doesn’t support DOTS instancing for that particular shader property. I suggest creating a shader graph shader so that you can expose a property that controls the scale and tiling and does support DOTS instancing.

I’m using the default URP Lit shader. I find it odd that this wouldn’t be supported yet.

Will attempt making a custom shader in the meantime.

SOLVED: Discovered that I did not have “GPU Instancing” checked on the material. Checking that box does apply the correct _BaseMap_ST properties.