getavgcolors - eisclimber/ExPresS-XR GitHub Wiki

ExcavationArea.GetAvgColors(int,Action)

Method in ExcavationArea

Summary

Returns the average color of the splatMap. THIS IS INSANELY EXPENSIVE AS THE GPU AND CPU NEED TO SYNC! CALL SPARINGLY!!!

public void GetAvgColors(int granularity, Action<AsyncGPUReadbackRequest> callback)

Parameters

Name Description
int granularity Granularity of the mipmap to be retrieved.
System.Action<UnityEngine.Rendering.AsyncGPUReadbackRequest> callback Callback executed after retrieving the texture.

Returns

Average Color.

⚠️ **GitHub.com Fallback** ⚠️