I have a problem when viewing a 3d placed canvas + TextMeshProUGUI with a near infinite angle of incidence. It get’s very bright, as seen in the screenshot below. This is a simple object with 4 canvas’s rotated around it to display a stats. I have HDR + bloom, so I’m assuming this is a result of very high HDR color values for the few pixels visible on the canvas, resulting in a crazy glow around them.
I’m at a loss on what the cause of this may be and how to go about resolving. Any suggestions?
If this is useful - this is how I’m setting up the Canvas:
for (int i = 0; i < 4; i++)
{
mPlacementCanvas.Add(null);
GameObject goCanvas = new GameObject("PlacementCanvas");
mPlacementCanvas[i] = goCanvas.AddComponent<Canvas>();
mPlacementCanvas[i].transform.SetParent(this.transform, false);
mPlacementCanvas[i].renderMode = RenderMode.WorldSpace;
goCanvas.AddComponent<CanvasScaler>();
goCanvas.AddComponent<GraphicRaycaster>();
RectTransform rt = goCanvas.GetComponent<RectTransform>();
rt.position = new Vector3(400f, 35f, 400f);
rt.sizeDelta = new Vector2(12f, 6f);
GameObject goText = new GameObject();
goText.transform.parent = mPlacementCanvas[i].transform;
goText.transform.localPosition = Vector3.zero;
CanvasRenderer cr = goText.AddComponent<CanvasRenderer>();
TextMeshProUGUI tmp = goText.AddComponent<TextMeshProUGUI>();
RectTransform trt = goText.GetComponent<RectTransform>();
trt.sizeDelta = Vector2.zero;
trt.anchorMin = Vector2.zero;
trt.anchorMax = new Vector2(1f, 1f);
trt.pivot = new Vector2(.5f, .5f);
tmp.font = mOverlord.mUIManager.TextMeshProFontAsset;
tmp.fontSize = 2f;
tmp.alignment = TextAlignmentOptions.Center;
tmp.text = "Testing";
}
mPlacementCanvas[0].transform.Rotate(0, -90f, 0);
mPlacementCanvas[1].transform.Rotate(0, 90f, 0);
mPlacementCanvas[2].transform.Rotate(0, 180f, 0);