// only add if anything in this decal set is visible.
AddToTextureList(refinstance.m_TextureList);
intinstanceCount=0;
intbatchCount=0;
Matrix4x4[]decalToWorldBatch=null;
// updates textures, texture atlas indices and blend value
publicvoidUpdateCachedMaterialData()
{
//instance.m_AllocationSuccess = true;
pair.Value.InitializeMaterialValues();
pair.Value.AddToTextureList(refm_TextureList);
pair.Value.InitializeMaterialValues();
}
}
AddTexture(cmd,textureScaleBias);
}
if(!m_AllocationSuccess)// still failed to allocate, decal atlas size needs to increase
if(!m_AllocationSuccess&&m_PrevAllocationSuccess)// still failed to allocate, decal atlas size needs to increase, debounce so that we don't spam the console with warnings
DecalSystem.instance.UpdateCachedMaterialData();// textures, alpha or fade distances could've changed
DecalSystem.instance.UpdateTextureAtlas(cmd);// as this is only used for transparent pass, would've been nice not to have to do this if no transparent renderers are visible
DecalSystem.instance.UpdateTextureAtlas(cmd);// as this is only used for transparent pass, would've been nice not to have to do this if no transparent renderers are visible, needs to happen after CreateDrawData