diff --git a/Assets/PM5644.png b/Assets/PM5644.png deleted file mode 100644 index 05f065f..0000000 Binary files a/Assets/PM5644.png and /dev/null differ diff --git a/Assets/Test.meta b/Assets/Test.meta new file mode 100644 index 0000000..95ccf78 --- /dev/null +++ b/Assets/Test.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2c1fbd3b5948a420f8971aeedee0b940 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test.unity b/Assets/Test.unity index 4d49bd5..33bc048 100644 --- a/Assets/Test.unity +++ b/Assets/Test.unity @@ -20,8 +20,8 @@ RenderSettings: m_FogDensity: 0.01 m_LinearFogStart: 0 m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.61209506, g: 0.7382521, b: 0.990566, a: 1} - m_AmbientEquatorColor: {r: 0.25267, g: 0.2935208, b: 0.3207547, a: 1} + m_AmbientSkyColor: {r: 0.8066038, g: 0.8704046, b: 1, a: 1} + m_AmbientEquatorColor: {r: 0.09211463, g: 0.13959594, b: 0.16981131, a: 1} m_AmbientGroundColor: {r: 0.33962262, g: 0.15218937, b: 0.15930918, a: 1} m_AmbientIntensity: 1 m_AmbientMode: 1 @@ -113,221 +113,127 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &1396357928 +--- !u!1 &95214361 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - - component: {fileID: 1396357931} - - component: {fileID: 1396357930} - - component: {fileID: 1396357929} + - component: {fileID: 95214363} + - component: {fileID: 95214362} m_Layer: 0 - m_Name: Test Card + m_Name: Client RT m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!23 &1396357929 -MeshRenderer: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1396357928} - m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: a76248f9553664ee1af77ae137af4ea7, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &1396357930 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1396357928} - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1396357931 -Transform: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1396357928} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: -0.1} - m_LocalScale: {x: 2, y: 1.125, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 3 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1615283079 -GameObject: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - serializedVersion: 5 - m_Component: - - component: {fileID: 1615283081} - - component: {fileID: 1615283080} - m_Layer: 0 - m_Name: Server - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 0 ---- !u!114 &1615283080 +--- !u!114 &95214362 MonoBehaviour: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615283079} + m_GameObject: {fileID: 95214361} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: d59ae4f317f9b4f8b8d64f71768aaea6, type: 3} + m_Script: {fileID: 11500000, guid: 6b79770b2944d4cdeb52083e0a22da31, type: 3} m_Name: m_EditorClassIdentifier: - _sourceTexture: {fileID: 8400000, guid: 8d0af5aa1aaed4323a2f0bcc6fd4bd48, type: 2} - _alphaSupport: 0 - _blitShader: {fileID: 4800000, guid: 1357bcacfdfbc48b290065349adbfb93, type: 3} ---- !u!4 &1615283081 + _appName: VDMX5 + _serverName: + _targetTexture: {fileID: 8400000, guid: a6a8d4e97af9b48d68bd2c0d9ac19056, type: 2} + _targetRenderer: {fileID: 0} + _targetMaterialProperty: + _nullTexture: {fileID: 2800000, guid: 4d452f854bc6b43488690d49f3cd2e9c, type: 3} +--- !u!4 &95214363 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1615283079} + m_GameObject: {fileID: 95214361} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 4 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1823015630 +--- !u!1 &271873199 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - - component: {fileID: 1823015634} - - component: {fileID: 1823015633} - - component: {fileID: 1823015632} - - component: {fileID: 1823015631} + - component: {fileID: 271873201} + - component: {fileID: 271873200} m_Layer: 0 - m_Name: Client Test + m_Name: Camera 2 m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &1823015631 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1823015630} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 6b79770b2944d4cdeb52083e0a22da31, type: 3} - m_Name: - m_EditorClassIdentifier: - _appName: Simple Server - _serverName: - _targetTexture: {fileID: 0} - _targetRenderer: {fileID: 1823015632} - _targetMaterialProperty: _MainTex - _nullTexture: {fileID: 2800000, guid: 4d452f854bc6b43488690d49f3cd2e9c, type: 3} ---- !u!23 &1823015632 -MeshRenderer: +--- !u!20 &271873200 +Camera: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1823015630} + m_GameObject: {fileID: 271873199} m_Enabled: 1 - m_CastShadows: 1 - m_ReceiveShadows: 1 - m_DynamicOccludee: 1 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RenderingLayerMask: 4294967295 - m_Materials: - - {fileID: 2100000, guid: 5c94f9100be8b48b99cd75770fbbdefc, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 0 - m_SelectedEditorRenderState: 3 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 ---- !u!33 &1823015633 -MeshFilter: - m_ObjectHideFlags: 0 - m_PrefabParentObject: {fileID: 0} - m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1823015630} - m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} ---- !u!4 &1823015634 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 1} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.01 + far clip plane: 100 + field of view: 90 + orthographic: 0 + orthographic size: 5 + m_Depth: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: 3 + m_TargetTexture: {fileID: 8400000, guid: 8d0af5aa1aaed4323a2f0bcc6fd4bd48, type: 2} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &271873201 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1823015630} + m_GameObject: {fileID: 271873199} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1.65, y: 1.65, z: 1} + m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &1879815346 +--- !u!1 &1023761535 GameObject: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} serializedVersion: 5 m_Component: - - component: {fileID: 1879815349} - - component: {fileID: 1879815348} - - component: {fileID: 1879815347} + - component: {fileID: 1023761538} + - component: {fileID: 1023761537} + - component: {fileID: 1023761536} m_Layer: 0 m_Name: Particle System m_TagString: Untagged @@ -335,13 +241,13 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!199 &1879815347 +--- !u!199 &1023761536 ParticleSystemRenderer: serializedVersion: 5 m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1879815346} + m_GameObject: {fileID: 1023761535} m_Enabled: 1 m_CastShadows: 0 m_ReceiveShadows: 0 @@ -351,7 +257,7 @@ ParticleSystemRenderer: m_ReflectionProbeUsage: 0 m_RenderingLayerMask: 4294967295 m_Materials: - - {fileID: 10301, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 0} m_StaticBatchInfo: firstSubMesh: 0 @@ -372,7 +278,7 @@ ParticleSystemRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_RenderMode: 0 + m_RenderMode: 4 m_SortMode: 0 m_MinParticleSize: 0 m_MaxParticleSize: 0.5 @@ -381,28 +287,28 @@ ParticleSystemRenderer: m_LengthScale: 2 m_SortingFudge: 0 m_NormalDirection: 1 - m_RenderAlignment: 0 + m_RenderAlignment: 1 m_Pivot: {x: 0, y: 0, z: 0} m_UseCustomVertexStreams: 0 m_EnableGPUInstancing: 1 m_VertexStreams: 00010304 - m_Mesh: {fileID: 0} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} m_Mesh1: {fileID: 0} m_Mesh2: {fileID: 0} m_Mesh3: {fileID: 0} m_MaskInteraction: 0 ---- !u!198 &1879815348 +--- !u!198 &1023761537 ParticleSystem: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1879815346} + m_GameObject: {fileID: 1023761535} serializedVersion: 5 lengthInSec: 5 simulationSpeed: 1 stopAction: 0 looping: 1 - prewarm: 1 + prewarm: 0 playOnAwake: 1 useUnscaledTime: 0 autoRandomSeed: 1 @@ -460,7 +366,7 @@ ParticleSystem: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - moveWithTransform: 0 + moveWithTransform: 1 moveWithCustomTransform: {fileID: 0} scalingMode: 1 randomSeed: 0 @@ -470,7 +376,7 @@ ParticleSystem: startLifetime: serializedVersion: 2 minMaxState: 3 - scalar: 2 + scalar: 4 minScalar: 0.1 maxCurve: serializedVersion: 2 @@ -523,7 +429,7 @@ ParticleSystem: startSpeed: serializedVersion: 2 minMaxState: 3 - scalar: 2 + scalar: 1 minScalar: 0.1 maxCurve: serializedVersion: 2 @@ -640,7 +546,7 @@ ParticleSystem: serializedVersion: 2 minMaxState: 3 scalar: 0.2 - minScalar: 0.05 + minScalar: 0.01 maxCurve: serializedVersion: 2 m_Curve: @@ -797,7 +703,7 @@ ParticleSystem: m_RotationOrder: 4 startRotationX: serializedVersion: 2 - minMaxState: 0 + minMaxState: 3 scalar: 0 minScalar: 0 maxCurve: @@ -850,7 +756,7 @@ ParticleSystem: m_RotationOrder: 4 startRotationY: serializedVersion: 2 - minMaxState: 0 + minMaxState: 3 scalar: 0 minScalar: 0 maxCurve: @@ -903,9 +809,9 @@ ParticleSystem: m_RotationOrder: 4 startRotation: serializedVersion: 2 - minMaxState: 0 - scalar: 0 - minScalar: 0 + minMaxState: 3 + scalar: 3.1415925 + minScalar: -3.1415925 maxCurve: serializedVersion: 2 m_Curve: @@ -1039,11 +945,11 @@ ParticleSystem: m_TextureColorAffectsParticles: 1 m_TextureAlphaAffectsParticles: 1 m_TextureBilinearFiltering: 0 - randomDirectionAmount: 0 + randomDirectionAmount: 1 sphericalDirectionAmount: 0 randomPositionAmount: 0 radius: - value: 0.6 + value: 2 mode: 0 spread: 0 speed: @@ -1162,7 +1068,7 @@ ParticleSystem: rateOverTime: serializedVersion: 2 minMaxState: 0 - scalar: 100 + scalar: 90 minScalar: 10 maxCurve: serializedVersion: 2 @@ -1280,14 +1186,14 @@ ParticleSystem: - serializedVersion: 3 time: 0 value: 0 - inSlope: 17.485716 - outSlope: 17.485716 + inSlope: 6.5571427 + outSlope: 6.5571427 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 - outWeight: 0.41609055 + outWeight: 0.67079973 - serializedVersion: 3 - time: 0.14137194 + time: 0.14165573 value: 1 inSlope: 0 outSlope: 0 @@ -1296,7 +1202,7 @@ ParticleSystem: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 - time: 0.39281082 + time: 0.79690886 value: 1 inSlope: 0 outSlope: 0 @@ -1307,11 +1213,11 @@ ParticleSystem: - serializedVersion: 3 time: 1 value: 0 - inSlope: -4.1771407 - outSlope: -4.1771407 + inSlope: -3.9464288 + outSlope: -3.9464288 tangentMode: 0 weightedMode: 0 - inWeight: 0.54254603 + inWeight: 0.6238422 outWeight: 0.33333334 m_PreInfinity: 2 m_PostInfinity: 2 @@ -1448,10 +1354,10 @@ ParticleSystem: m_RotationOrder: 4 separateAxes: 0 RotationModule: - enabled: 0 + enabled: 1 x: serializedVersion: 2 - minMaxState: 0 + minMaxState: 3 scalar: 0 minScalar: 0 maxCurve: @@ -1504,7 +1410,7 @@ ParticleSystem: m_RotationOrder: 4 y: serializedVersion: 2 - minMaxState: 0 + minMaxState: 3 scalar: 0 minScalar: 0 maxCurve: @@ -1557,9 +1463,9 @@ ParticleSystem: m_RotationOrder: 4 curve: serializedVersion: 2 - minMaxState: 0 - scalar: 0.7853982 - minScalar: 0.7853982 + minMaxState: 3 + scalar: 1.5707963 + minScalar: -1.5707963 maxCurve: serializedVersion: 2 m_Curve: @@ -1618,9 +1524,9 @@ ParticleSystem: maxColor: {r: 1, g: 1, b: 1, a: 1} maxGradient: serializedVersion: 2 - key0: {r: 1, g: 1, b: 1, a: 0.1922885} + key0: {r: 1, g: 1, b: 1, a: 1} key1: {r: 1, g: 1, b: 1, a: 1} - key2: {r: 0, g: 0, b: 0, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} key3: {r: 0, g: 0, b: 0, a: 0} key4: {r: 0, g: 0, b: 0, a: 0} key5: {r: 0, g: 0, b: 0, a: 0} @@ -1635,16 +1541,16 @@ ParticleSystem: ctime6: 0 ctime7: 0 atime0: 0 - atime1: 5012 - atime2: 51464 - atime3: 65535 - atime4: 65535 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 atime5: 0 atime6: 0 atime7: 0 m_Mode: 0 m_NumColorKeys: 2 - m_NumAlphaKeys: 4 + m_NumAlphaKeys: 2 minGradient: serializedVersion: 2 key0: {r: 1, g: 1, b: 1, a: 1} @@ -4940,19 +4846,320 @@ ParticleSystem: m_PostInfinity: 2 m_RotationOrder: 4 vectorLabel1_3: W ---- !u!4 &1879815349 +--- !u!4 &1023761538 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1023761535} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1681324355 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1681324357} + - component: {fileID: 1681324356} + m_Layer: 0 + m_Name: Camera 2 Server + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1681324356 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1681324355} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d59ae4f317f9b4f8b8d64f71768aaea6, type: 3} + m_Name: + m_EditorClassIdentifier: + _sourceTexture: {fileID: 8400000, guid: 8d0af5aa1aaed4323a2f0bcc6fd4bd48, type: 2} + _alphaSupport: 0 + _blitShader: {fileID: 4800000, guid: 1357bcacfdfbc48b290065349adbfb93, type: 3} +--- !u!4 &1681324357 Transform: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_GameObject: {fileID: 1879815346} - m_LocalRotation: {x: -0.7071068, y: 0, z: 0, w: 0.7071068} + m_GameObject: {fileID: 1681324355} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1686328583 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1686328587} + - component: {fileID: 1686328586} + - component: {fileID: 1686328585} + - component: {fileID: 1686328584} + m_Layer: 0 + m_Name: Test Card Camera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1686328584 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1686328583} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d59ae4f317f9b4f8b8d64f71768aaea6, type: 3} + m_Name: + m_EditorClassIdentifier: + _sourceTexture: {fileID: 0} + _alphaSupport: 0 + _blitShader: {fileID: 4800000, guid: 1357bcacfdfbc48b290065349adbfb93, type: 3} +--- !u!114 &1686328585 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1686328583} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 09e531f25570e604d8fb78aee77125a9, type: 3} + m_Name: + m_EditorClassIdentifier: + _mode: 3 + _color: {r: 0.5, g: 0.5, b: 0.5, a: 1} + _scale: 4 + _shader: {fileID: 4800000, guid: bc6a0edaa182a35449d12a1445ba38db, type: 3} +--- !u!20 &1686328586 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1686328583} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 2 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + orthographic size: 5 + m_Depth: -10 + m_CullingMask: + serializedVersion: 2 + m_Bits: 0 + m_RenderingPath: 1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 0 + m_AllowMSAA: 0 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 0 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &1686328587 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1686328583} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1706412729 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1706412732} + - component: {fileID: 1706412731} + - component: {fileID: 1706412730} + m_Layer: 0 + m_Name: RT Quad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1706412730 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1706412729} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_Materials: + - {fileID: 2100000, guid: dbfedaa111daf44a7ae3a116137afc8e, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1706412731 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1706412729} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1706412732 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1706412729} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 1, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1823015630 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1823015634} + - component: {fileID: 1823015633} + - component: {fileID: 1823015632} + - component: {fileID: 1823015631} + m_Layer: 0 + m_Name: Client Cube + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1823015631 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1823015630} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6b79770b2944d4cdeb52083e0a22da31, type: 3} + m_Name: + m_EditorClassIdentifier: + _appName: VDMX5 + _serverName: + _targetTexture: {fileID: 0} + _targetRenderer: {fileID: 1823015632} + _targetMaterialProperty: _MainTex + _nullTexture: {fileID: 2800000, guid: 4d452f854bc6b43488690d49f3cd2e9c, type: 3} +--- !u!23 &1823015632 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1823015630} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 4294967295 + m_Materials: + - {fileID: 2100000, guid: 5c94f9100be8b48b99cd75770fbbdefc, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1823015633 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1823015630} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1823015634 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1823015630} + m_LocalRotation: {x: 0.061628394, y: 0.5792279, z: -0.70441604, w: -0.4055798} + m_LocalPosition: {x: -0.5, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 130, y: 120, z: -90} --- !u!1 &1888210493 GameObject: m_ObjectHideFlags: 0 @@ -4995,7 +5202,7 @@ Camera: m_Enabled: 1 serializedVersion: 2 m_ClearFlags: 2 - m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1} + m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} m_NormalizedViewPortRect: serializedVersion: 2 x: 0 @@ -5047,5 +5254,5 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _sourceTexture: {fileID: 0} - _alphaSupport: 0 + _alphaSupport: 1 _blitShader: {fileID: 4800000, guid: 1357bcacfdfbc48b290065349adbfb93, type: 3} diff --git a/Assets/Test/Camera 2.renderTexture b/Assets/Test/Camera 2.renderTexture new file mode 100644 index 0000000..7a80b9f --- /dev/null +++ b/Assets/Test/Camera 2.renderTexture @@ -0,0 +1,33 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!84 &8400000 +RenderTexture: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_Name: Camera 2 + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_ForcedFallbackFormat: 4 + m_DownscaleFallback: 0 + m_Width: 512 + m_Height: 512 + m_AntiAliasing: 1 + m_DepthFormat: 2 + m_ColorFormat: 0 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 0 + m_UseDynamicScale: 0 + m_BindMS: 0 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 0 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 2 + m_VolumeDepth: 1 diff --git a/Assets/Server.renderTexture.meta b/Assets/Test/Camera 2.renderTexture.meta similarity index 100% rename from Assets/Server.renderTexture.meta rename to Assets/Test/Camera 2.renderTexture.meta diff --git a/Assets/Server.renderTexture b/Assets/Test/Client.renderTexture similarity index 92% rename from Assets/Server.renderTexture rename to Assets/Test/Client.renderTexture index 4fd49b8..0676665 100644 --- a/Assets/Server.renderTexture +++ b/Assets/Test/Client.renderTexture @@ -5,14 +5,14 @@ RenderTexture: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_Name: Server + m_Name: Client m_ImageContentsHash: serializedVersion: 2 Hash: 00000000000000000000000000000000 m_ForcedFallbackFormat: 4 m_DownscaleFallback: 0 - m_Width: 256 - m_Height: 256 + m_Width: 512 + m_Height: 512 m_AntiAliasing: 1 m_DepthFormat: 2 m_ColorFormat: 0 diff --git a/Assets/Test/Client.renderTexture.meta b/Assets/Test/Client.renderTexture.meta new file mode 100644 index 0000000..d6294b3 --- /dev/null +++ b/Assets/Test/Client.renderTexture.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6a8d4e97af9b48d68bd2c0d9ac19056 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 8400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Blit.mat b/Assets/Test/Cube.mat similarity index 99% rename from Assets/Blit.mat rename to Assets/Test/Cube.mat index b9fca5c..74b774a 100644 --- a/Assets/Blit.mat +++ b/Assets/Test/Cube.mat @@ -6,7 +6,7 @@ Material: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_Name: Blit + m_Name: Cube m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0} m_ShaderKeywords: m_LightmapFlags: 4 diff --git a/Assets/Blit.mat.meta b/Assets/Test/Cube.mat.meta similarity index 100% rename from Assets/Blit.mat.meta rename to Assets/Test/Cube.mat.meta diff --git a/Assets/Test.mat b/Assets/Test/Quad.mat similarity index 93% rename from Assets/Test.mat rename to Assets/Test/Quad.mat index 4d0989d..3e840c2 100644 --- a/Assets/Test.mat +++ b/Assets/Test/Quad.mat @@ -6,7 +6,7 @@ Material: m_ObjectHideFlags: 0 m_PrefabParentObject: {fileID: 0} m_PrefabInternal: {fileID: 0} - m_Name: Test + m_Name: Quad m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0} m_ShaderKeywords: m_LightmapFlags: 4 @@ -39,7 +39,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 2800000, guid: 247d98b8fad954179844a19741453ca7, type: 3} + m_Texture: {fileID: 8400000, guid: a6a8d4e97af9b48d68bd2c0d9ac19056, type: 2} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: @@ -72,5 +72,5 @@ Material: - _UVSec: 0 - _ZWrite: 1 m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 0, b: 0, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Test.mat.meta b/Assets/Test/Quad.mat.meta similarity index 79% rename from Assets/Test.mat.meta rename to Assets/Test/Quad.mat.meta index d4b5e0a..c1c8683 100644 --- a/Assets/Test.mat.meta +++ b/Assets/Test/Quad.mat.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a76248f9553664ee1af77ae137af4ea7 +guid: dbfedaa111daf44a7ae3a116137afc8e NativeFormatImporter: externalObjects: {} mainObjectFileID: 2100000 diff --git a/Assets/Test/TestCards.meta b/Assets/Test/TestCards.meta new file mode 100755 index 0000000..ec739b1 --- /dev/null +++ b/Assets/Test/TestCards.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a2511bfcba02cbe42a514922aad98572 +folderAsset: yes +timeCreated: 1490421382 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/TestCards/Editor.meta b/Assets/Test/TestCards/Editor.meta new file mode 100755 index 0000000..93782a4 --- /dev/null +++ b/Assets/Test/TestCards/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f8f48d1eb75e9e74f95d6524d42a28a5 +folderAsset: yes +timeCreated: 1490423409 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/TestCards/Editor/TestOverlayEditor.cs b/Assets/Test/TestCards/Editor/TestOverlayEditor.cs new file mode 100755 index 0000000..bbb87bc --- /dev/null +++ b/Assets/Test/TestCards/Editor/TestOverlayEditor.cs @@ -0,0 +1,35 @@ +using UnityEditor; +using UnityEngine; + +namespace TestCards +{ + [CustomEditor(typeof(TestOverlay))] + public class TestOverlayEditor : Editor + { + SerializedProperty _mode; + SerializedProperty _color; + SerializedProperty _scale; + + void OnEnable() + { + _mode = serializedObject.FindProperty("_mode"); + _color = serializedObject.FindProperty("_color"); + _scale = serializedObject.FindProperty("_scale"); + } + + public override void OnInspectorGUI() + { + serializedObject.Update(); + + EditorGUILayout.PropertyField(_mode); + + if (_mode.intValue == (int)TestOverlay.Mode.Fill) + EditorGUILayout.PropertyField(_color); + + if (_mode.intValue == (int)TestOverlay.Mode.Checker) + EditorGUILayout.PropertyField(_scale); + + serializedObject.ApplyModifiedProperties(); + } + } +} diff --git a/Assets/Test/TestCards/Editor/TestOverlayEditor.cs.meta b/Assets/Test/TestCards/Editor/TestOverlayEditor.cs.meta new file mode 100755 index 0000000..c92c89d --- /dev/null +++ b/Assets/Test/TestCards/Editor/TestOverlayEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5a0964021fc3f424f855812e3a78111c +timeCreated: 1490423409 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/TestCards/Shader.meta b/Assets/Test/TestCards/Shader.meta new file mode 100755 index 0000000..530b03b --- /dev/null +++ b/Assets/Test/TestCards/Shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 98ccbbd3e8d8a62498510d48ada470fe +folderAsset: yes +timeCreated: 1490423502 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/TestCards/Shader/PM5644.png b/Assets/Test/TestCards/Shader/PM5644.png new file mode 100755 index 0000000..7fbf9c9 Binary files /dev/null and b/Assets/Test/TestCards/Shader/PM5644.png differ diff --git a/Assets/PM5644.png.meta b/Assets/Test/TestCards/Shader/PM5644.png.meta old mode 100644 new mode 100755 similarity index 57% rename from Assets/PM5644.png.meta rename to Assets/Test/TestCards/Shader/PM5644.png.meta index 5d80968..e105720 --- a/Assets/PM5644.png.meta +++ b/Assets/Test/TestCards/Shader/PM5644.png.meta @@ -1,9 +1,10 @@ fileFormatVersion: 2 -guid: 247d98b8fad954179844a19741453ca7 +guid: ff1369e14027fbc4e8a2680352f8ea06 +timeCreated: 1481124760 +licenseType: Pro TextureImporter: fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 5 + serializedVersion: 4 mipmaps: mipMapMode: 0 enableMipMap: 0 @@ -11,8 +12,6 @@ TextureImporter: linearTexture: 0 fadeOut: 0 borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 mipMapFadeDistanceStart: 1 mipMapFadeDistanceEnd: 3 bumpmap: @@ -25,81 +24,52 @@ TextureImporter: generateCubemap: 6 cubemapConvolution: 0 seamlessCubemap: 0 - textureFormat: 1 + textureFormat: 3 maxTextureSize: 2048 textureSettings: - serializedVersion: 2 filterMode: -1 - aniso: -1 + aniso: 8 mipBias: -1 - wrapU: 1 - wrapV: 1 - wrapW: -1 + wrapMode: 1 nPOTScale: 0 lightmap: 0 compressionQuality: 50 - spriteMode: 1 + spriteMode: 0 spriteExtrude: 1 spriteMeshType: 1 alignment: 0 spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 0 - alphaUsage: 1 - alphaIsTransparency: 1 + spritePixelsToUnits: 100 + alphaUsage: 0 + alphaIsTransparency: 0 spriteTessellationDetail: -1 - textureType: 8 + textureType: 0 textureShape: 1 - singleChannelComponent: 0 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Standalone + - buildTarget: DefaultTexturePlatform maxTextureSize: 2048 - resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: iPhone + - buildTarget: Standalone maxTextureSize: 2048 - resizeAlgorithm: 0 textureFormat: -1 textureCompression: 0 compressionQuality: 50 crunchedCompression: 0 allowsAlphaSplitting: 0 overridden: 0 - androidETC2FallbackOverride: 0 spriteSheet: serializedVersion: 2 sprites: [] outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] spritePackingTag: userData: assetBundleName: diff --git a/Assets/Test/TestCards/Shader/TestOverlay.shader b/Assets/Test/TestCards/Shader/TestOverlay.shader new file mode 100755 index 0000000..4adbe81 --- /dev/null +++ b/Assets/Test/TestCards/Shader/TestOverlay.shader @@ -0,0 +1,128 @@ +Shader "Hidden/TestCards/Overlay" +{ + Properties + { + _MainTex("", 2D) = "black"{} + _Color("", Color) = (0.5, 0.5, 0.5) + } + + CGINCLUDE + + #include "UnityCG.cginc" + + sampler2D _MainTex; + float4 _MainTex_TexelSize; + + half3 _Color; + float _Scale; + + // Hue to RGB convertion + half3 HueToRGB(half h) + { + h = saturate(h); + half r = abs(h * 6 - 3) - 1; + half g = 2 - abs(h * 6 - 2); + half b = 2 - abs(h * 6 - 4); + half3 rgb = saturate(half3(r, g, b)); + return rgb; + } + + half4 frag_fill(v2f_img i) : SV_Target + { + return half4(_Color, 1); + } + + half4 frag_spectrum(v2f_img i) : SV_Target + { + half3 rgb = lerp(HueToRGB(i.uv.x), i.uv.x, i.uv.y > 0.5); + #if !defined(UNITY_COLORSPACE_GAMMA) + rgb = GammaToLinearSpace(rgb); + #endif + return half4(rgb, 1); + } + + half4 frag_checker(v2f_img i) : SV_Target + { + float2 c = step(0.4999, frac(i.uv.xy * _MainTex_TexelSize.zw * _Scale)); + return abs(c.x - c.y); + } + + half4 frag_pattern(v2f_img i) : SV_Target + { + float scale = 27 * _MainTex_TexelSize.y; // Grid scale + float2 p0 = (i.uv - 0.5) * _MainTex_TexelSize.zw; // Position (pixel) + float2 p1 = p0 * scale; // Position (half grid) + float2 p2 = p1 / 2 - 0.5; // Position (grid) + + // Size of inner area + half aspect = _MainTex_TexelSize.y * _MainTex_TexelSize.z; + half2 area = half2(floor(6.5 * aspect) * 2 + 1, 13); + + // Crosshair and grid lines + half2 ch = abs(p0); + half2 grid = (1 - abs(frac(p2) - 0.5) * 2) / scale; + half c1 = min(min(ch.x, ch.y), min(grid.x, grid.y)) < 1 ? 1 : 0.5; + + // Outer area checker + half2 checker = frac(floor(p2) / 2) * 2; + if (any(abs(p1) > area)) c1 = abs(checker.x - checker.y); + + half corner = sqrt(8) - length(abs(p1) - area + 4); // Corner circles + half circle = 12 - length(p1); // Big center circle + half mask = saturate(circle / scale); // Center circls mask + + // Grayscale bars + half bar1 = saturate(p1.y < 5 ? floor(p1.x / 4 + 3) / 5 : p1.x / 16 + 0.5); + if (abs(5 - p1.y) < 4 * mask) c1 = bar1; + + // Basic color bars + half3 bar2 = HueToRGB((p1.y > -5 ? floor(p1.x / 4) / 6 : p1.x / 16) + 0.5); + float3 rgb = abs(-5 - p1.y) < 4 * mask ? bar2 : saturate(c1); + + // Circle lines + rgb = lerp(rgb, 1, saturate(1.5 - abs(max(circle, corner)) / scale)); + + #if !defined(UNITY_COLORSPACE_GAMMA) + rgb = GammaToLinearSpace(rgb); + #endif + + return half4(rgb, 1); + } + + ENDCG + + SubShader + { + Cull Off ZWrite Off ZTest Always + Pass + { + CGPROGRAM + #pragma vertex vert_img + #pragma fragment frag_fill + ENDCG + } + Pass + { + CGPROGRAM + #pragma multi_compile __ UNITY_COLORSPACE_GAMMA + #pragma vertex vert_img + #pragma fragment frag_spectrum + ENDCG + } + Pass + { + CGPROGRAM + #pragma vertex vert_img + #pragma fragment frag_checker + ENDCG + } + Pass + { + CGPROGRAM + #pragma multi_compile __ UNITY_COLORSPACE_GAMMA + #pragma vertex vert_img + #pragma fragment frag_pattern + ENDCG + } + } +} diff --git a/Assets/Test/TestCards/Shader/TestOverlay.shader.meta b/Assets/Test/TestCards/Shader/TestOverlay.shader.meta new file mode 100755 index 0000000..4ff206b --- /dev/null +++ b/Assets/Test/TestCards/Shader/TestOverlay.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bc6a0edaa182a35449d12a1445ba38db +timeCreated: 1490421835 +licenseType: Pro +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Test/TestCards/TestOverlay.cs b/Assets/Test/TestCards/TestOverlay.cs new file mode 100755 index 0000000..050e110 --- /dev/null +++ b/Assets/Test/TestCards/TestOverlay.cs @@ -0,0 +1,70 @@ +using UnityEngine; + +namespace TestCards +{ + [ExecuteInEditMode] + [RequireComponent(typeof(Camera))] + public class TestOverlay : MonoBehaviour + { + #region Editable properties + + public enum Mode { Fill, Spectrum, Checker, Pattern } + + [SerializeField] Mode _mode = Mode.Pattern; + + public Mode mode { + get { return _mode; } + set { _mode = value; } + } + + [SerializeField] Color _color = Color.gray; + + public Color color { + get { return _color; } + set { _color = value; } + } + + [SerializeField, Range(1, 8)] int _scale = 4; + + public int scale { + get { return _scale; } + set { _scale = value; } + } + + #endregion + + #region Private members + + [SerializeField, HideInInspector] Shader _shader; + Material _material; + + #endregion + + #region MonoBehaviour functions + + void OnDestroy() + { + if (_material != null) + if (Application.isPlaying) + Destroy(_material); + else + DestroyImmediate(_material); + } + + void OnRenderImage(RenderTexture source, RenderTexture destination) + { + if (_material == null) + { + _material = new Material(_shader); + _material.hideFlags = HideFlags.DontSave; + } + + _material.color = _color; + _material.SetFloat("_Scale", 1.0f / Mathf.Pow(2, _scale)); + + Graphics.Blit(source, destination, _material, (int)_mode); + } + + #endregion + } +} diff --git a/Assets/Test/TestCards/TestOverlay.cs.meta b/Assets/Test/TestCards/TestOverlay.cs.meta new file mode 100755 index 0000000..fa9449f --- /dev/null +++ b/Assets/Test/TestCards/TestOverlay.cs.meta @@ -0,0 +1,14 @@ +fileFormatVersion: 2 +guid: 09e531f25570e604d8fb78aee77125a9 +timeCreated: 1490422325 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: + - _shader: {fileID: 4800000, guid: bc6a0edaa182a35449d12a1445ba38db, type: 3} + - _patternTexture: {fileID: 2800000, guid: ff1369e14027fbc4e8a2680352f8ea06, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 8b01145..38cc0a4 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -228,6 +228,8 @@ PlayerSettings: appleDeveloperTeamID: iOSManualSigningProvisioningProfileID: tvOSManualSigningProvisioningProfileID: + iOSManualSigningProvisioningProfileType: 0 + tvOSManualSigningProvisioningProfileType: 0 appleEnableAutomaticSigning: 0 iOSRequireARKit: 0 appleEnableProMotion: 0