master
Cal 2024-11-19 16:09:56 +08:00
parent d714fb604f
commit ee8166613a
2 changed files with 68 additions and 70 deletions

View File

@ -79,7 +79,6 @@ namespace ZC
{
if (_doneTextureDatas.TryRemove(this._doneFrameIndex, out var result))
{
Debug.Log($"[{_frameCount}]_doneFrameIndex:{_doneFrameIndex}");
var textureData = result;
Profiler.BeginSample("Conversion");
Bitmap.EncodeToBitmap(textureData, _bitmapArray, 0, textureData.Length, _targetTextureWidth, this._targetTextureHeight);
@ -125,7 +124,6 @@ namespace ZC
}
var frameIndex = this._frameIndex + 1 >= uint.MaxValue ? this._frameIndex = 0 : this._frameIndex++;
Debug.Log($"[{Time.frameCount}]frameIndex:{frameIndex}");
AsyncGPUReadback.RequestIntoNativeArray(ref nativeArray, cameraActiveTexture, 0, GraphicsFormat.B8G8R8_SRGB, request =>
{
if (request is { done: true, hasError: false })

View File

@ -25,7 +25,7 @@ MonoBehaviour:
m_MinSize: {x: 400, y: 150}
m_MaxSize: {x: 32384, y: 24288}
vertical: 0
controlID: 14567
controlID: 4724
draggingID: 0
--- !u!114 &2
MonoBehaviour:
@ -47,10 +47,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 34
y: 824
width: 1121
height: 156
x: 36
y: 501
width: 1180
height: 494
m_SerializedDataModeController:
m_DataMode: 0
m_PreferredDataMode: 0
@ -103,23 +103,23 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 21
width: 1121
height: 135
m_Scale: {x: 0.125, y: 0.125}
m_Translation: {x: 560.5, y: 67.5}
width: 1180
height: 473
m_Scale: {x: 0.43796295, y: 0.43796295}
m_Translation: {x: 590, y: 236.5}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -4484
x: -1347.1459
y: -540
width: 8968
width: 2694.2917
height: 1080
m_MinimalGUI: 1
m_defaultScale: 0.125
m_LastWindowPixelSize: {x: 1121, y: 156}
m_defaultScale: 0.43796295
m_LastWindowPixelSize: {x: 1180, y: 494}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 01000000000000000000
@ -144,12 +144,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1351
width: 1424
height: 1152
m_MinSize: {x: 200, y: 150}
m_MaxSize: {x: 16192, y: 24288}
vertical: 0
controlID: 14568
controlID: 4725
draggingID: 0
--- !u!114 &4
MonoBehaviour:
@ -171,12 +171,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1122
width: 1181
height: 1152
m_MinSize: {x: 100, y: 150}
m_MaxSize: {x: 8096, y: 24288}
vertical: 1
controlID: 14569
controlID: 4726
draggingID: 0
--- !u!114 &5
MonoBehaviour:
@ -195,8 +195,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1122
height: 618
width: 1181
height: 320
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 6}
@ -224,10 +224,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 34
y: 206
width: 1121
height: 597
x: 36
y: 181
width: 1180
height: 299
m_SerializedDataModeController:
m_DataMode: 0
m_PreferredDataMode: 0
@ -255,9 +255,9 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 1
snapOffset: {x: -141, y: 149}
snapOffset: {x: -141, y: -150}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 1
snapCorner: 3
id: unity-grid-and-snap-toolbar
index: 1
layout: 1
@ -547,9 +547,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: 557.97614, y: -379.7131, z: 569.63074}
m_Target: {x: -5.8655267, y: 213.7894, z: 101.9735}
speed: 2
m_Value: {x: 557.97614, y: -379.7131, z: 569.63074}
m_Value: {x: -5.8655267, y: 213.7894, z: 101.9735}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@ -595,13 +595,13 @@ MonoBehaviour:
m_GridAxis: 1
m_gridOpacity: 0.5
m_Rotation:
m_Target: {x: -0.18233694, y: -0.31602854, z: 0.062028006, w: -0.928995}
m_Target: {x: -0.11479808, y: -0.7598516, z: 0.13969089, w: -0.62444675}
speed: 2
m_Value: {x: -0.18242978, y: -0.31463468, z: 0.06175443, w: -0.92946804}
m_Value: {x: -0.11479806, y: -0.75985146, z: 0.13969088, w: -0.6244467}
m_Size:
m_Target: 1427.9281
m_Target: 633.70593
speed: 2
m_Value: 1258.0864
m_Value: 633.70593
m_Ortho:
m_Target: 0
speed: 2
@ -642,9 +642,9 @@ MonoBehaviour:
m_Position:
serializedVersion: 2
x: 0
y: 618
width: 1122
height: 177
y: 320
width: 1181
height: 515
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 2}
@ -668,9 +668,9 @@ MonoBehaviour:
m_Position:
serializedVersion: 2
x: 0
y: 795
width: 1122
height: 357
y: 835
width: 1181
height: 317
m_MinSize: {x: 101, y: 121}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 9}
@ -698,10 +698,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 34
y: 1001
width: 1121
height: 336
x: 36
y: 1016
width: 1180
height: 296
m_SerializedDataModeController:
m_DataMode: 0
m_PreferredDataMode: 0
@ -727,9 +727,9 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 1122
x: 1181
y: 0
width: 229
width: 243
height: 1152
m_MinSize: {x: 102, y: 121}
m_MaxSize: {x: 4002, y: 4021}
@ -758,9 +758,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1156
y: 206
width: 227
x: 1217
y: 181
width: 241
height: 1131
m_SerializedDataModeController:
m_DataMode: 0
@ -775,23 +775,23 @@ MonoBehaviour:
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: b65a0000
m_LastClickedID: 23222
m_ExpandedIDs: 4672b4ff24fbffffa45a0000
m_SelectedIDs: a65a0000
m_LastClickedID: 23206
m_ExpandedIDs: 20fbffff
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name: Camera
m_OriginalName: Camera
m_Name:
m_OriginalName:
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
m_UserData: 23232
m_UserData: 0
m_IsWaitingForDelay: 0
m_IsRenaming: 0
m_OriginalEventType: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 0
m_ClientGUIView: {fileID: 10}
m_SearchString:
@ -816,9 +816,9 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 1351
x: 1424
y: 0
width: 235
width: 162
height: 1152
m_MinSize: {x: 232, y: 271}
m_MaxSize: {x: 10002, y: 10021}
@ -847,9 +847,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1385
y: 206
width: 233
x: 1460
y: 181
width: 160
height: 1131
m_SerializedDataModeController:
m_DataMode: 0
@ -887,9 +887,9 @@ MonoBehaviour:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: f85a0000
m_LastClickedID: 23288
m_ExpandedIDs: 00000000f85a000000ca9a3b
m_SelectedIDs: 025b0000
m_LastClickedID: 23298
m_ExpandedIDs: 00000000025b000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -917,7 +917,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000f85a000000ca9a3b
m_ExpandedIDs: 00000000025b000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@ -942,8 +942,8 @@ MonoBehaviour:
m_Icon: {fileID: 0}
m_ResourceFile:
m_ListAreaState:
m_SelectedInstanceIDs: b65a0000
m_LastClickedInstanceID: 23222
m_SelectedInstanceIDs: a65a0000
m_LastClickedInstanceID: 23206
m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c623000040bf0300
m_RenameOverlay:
@ -972,7 +972,7 @@ MonoBehaviour:
m_ScrollPosition: {x: 0, y: 0}
m_GridSize: 16
m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 183
m_DirectoriesAreaWidth: 110
--- !u!114 &14
MonoBehaviour:
m_ObjectHideFlags: 52
@ -1020,8 +1020,8 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1620
y: 206
x: 1622
y: 181
width: 295
height: 1131
m_SerializedDataModeController:
@ -1087,7 +1087,7 @@ MonoBehaviour:
m_CachedPref: 160
m_ControlHash: 1412526313
m_PrefName: Preview_InspectorPreview
m_LastInspectedObjectInstanceID: -1
m_LastInspectedObjectInstanceID: 23206
m_LastVerticalScrollValue: 0
m_GlobalObjectId:
m_InspectorMode: 0