|
@@ -144,6 +144,8 @@ namespace o0.Project
|
|
|
|
|
|
|
|
//bStartLocateScreen = false;
|
|
//bStartLocateScreen = false;
|
|
|
|
|
|
|
|
|
|
+ ScreenWhiteTexture = null;
|
|
|
|
|
+ ScreenBlackTexture = null;
|
|
|
OnLocateScreenEnter?.Invoke();
|
|
OnLocateScreenEnter?.Invoke();
|
|
|
}
|
|
}
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -255,6 +257,7 @@ namespace o0.Project
|
|
|
if (ScreenBlackTexture == null)
|
|
if (ScreenBlackTexture == null)
|
|
|
ScreenBlackTexture = new Geometry.Vector<float>[Size.x * Size.y];
|
|
ScreenBlackTexture = new Geometry.Vector<float>[Size.x * Size.y];
|
|
|
Debug.Log($"采样屏幕黑色,Texture2D size: {cam.Size()}, ScreenLocate size: ({Size.x}, {Size.y})");
|
|
Debug.Log($"采样屏幕黑色,Texture2D size: {cam.Size()}, ScreenLocate size: ({Size.x}, {Size.y})");
|
|
|
|
|
+ Debug.Log($"ScreenBlackTexture.Length: ({ScreenBlackTexture.Length})");
|
|
|
|
|
|
|
|
var pixel = cam.GetPixels();
|
|
var pixel = cam.GetPixels();
|
|
|
Parallel.For(0, Size.x * Size.y, i =>
|
|
Parallel.For(0, Size.x * Size.y, i =>
|
|
@@ -269,6 +272,7 @@ namespace o0.Project
|
|
|
if (ScreenWhiteTexture == null)
|
|
if (ScreenWhiteTexture == null)
|
|
|
ScreenWhiteTexture = new Geometry.Vector<float>[Size.x * Size.y];
|
|
ScreenWhiteTexture = new Geometry.Vector<float>[Size.x * Size.y];
|
|
|
Debug.Log($"采样屏幕白色,Texture2D size: {cam.Size()}, ScreenLocate size: ({Size.x}, {Size.y})");
|
|
Debug.Log($"采样屏幕白色,Texture2D size: {cam.Size()}, ScreenLocate size: ({Size.x}, {Size.y})");
|
|
|
|
|
+ Debug.Log($"ScreenWhiteTexture.Length: ({ScreenWhiteTexture.Length})");
|
|
|
|
|
|
|
|
var pixel = cam.GetPixels();
|
|
var pixel = cam.GetPixels();
|
|
|
Parallel.For(0, Size.x * Size.y, i =>
|
|
Parallel.For(0, Size.x * Size.y, i =>
|