Lock URP runtime invalidation to asset and renderer data state

This commit is contained in:
2026-04-27 19:56:29 +08:00
parent f528295f88
commit 9428fec350
7 changed files with 467 additions and 1 deletions

View File

@@ -410,6 +410,54 @@ namespace XCEngine.Rendering.Universal
hash = Combine(hash, value.renderStateBlock);
return hash;
}
public static int Combine(
int hash,
FinalColorSettings value)
{
hash = Combine(hash, (int)value.outputTransferMode);
hash = Combine(hash, (int)value.exposureMode);
hash = Combine(hash, value.exposureValue);
hash = Combine(hash, (int)value.toneMappingMode);
hash = Combine(hash, value.finalColorScale);
return hash;
}
public static int Combine(
int hash,
DirectionalShadowSamplingSettings value)
{
hash = Combine(hash, value.receiverDepthBias);
hash = Combine(hash, value.normalBiasScale);
hash = Combine(hash, value.shadowStrength);
return hash;
}
public static int Combine(
int hash,
DirectionalShadowCasterBiasSettings value)
{
hash = Combine(hash, value.depthBiasFactor);
hash = Combine(hash, value.depthBiasUnits);
return hash;
}
public static int Combine(
int hash,
DirectionalShadowPlanningSettings value)
{
hash = Combine(hash, value.mapDimension);
hash = Combine(hash, value.minFocusDistance);
hash = Combine(hash, value.maxFocusDistance);
hash = Combine(hash, value.perspectiveFocusFactor);
hash = Combine(hash, value.orthographicFocusFactor);
hash = Combine(hash, value.minDepthRange);
hash = Combine(hash, value.boundsPadding);
hash = Combine(hash, value.minDepthPadding);
hash = Combine(hash, value.sampling);
hash = Combine(hash, value.casterBias);
return hash;
}
}
}