add board-style screen.
This commit is contained in:
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 42d6b6dbae38a384e882c2c907915139
|
||||||
|
timeCreated: 1478889784
|
||||||
|
licenseType: Pro
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,6 +9,10 @@ public class MultipleMonitorCreator : MonoBehaviour
|
|||||||
bool hasMonitorUnsupportStateChecked = false;
|
bool hasMonitorUnsupportStateChecked = false;
|
||||||
float removeWaitTimer_ = 0f;
|
float removeWaitTimer_ = 0f;
|
||||||
|
|
||||||
|
public enum MeshForwardDirection { Y, Z }
|
||||||
|
[Tooltip("Please specify the upper vector direction of the mesh (e.g. Plane's upper direction is Y.)")]
|
||||||
|
public MeshForwardDirection meshForwardDirection = MeshForwardDirection.Z;
|
||||||
|
|
||||||
public class MonitorInfo
|
public class MonitorInfo
|
||||||
{
|
{
|
||||||
public GameObject gameObject { get; set; }
|
public GameObject gameObject { get; set; }
|
||||||
@@ -88,7 +92,11 @@ public class MultipleMonitorCreator : MonoBehaviour
|
|||||||
var monitor = texture.monitor;
|
var monitor = texture.monitor;
|
||||||
|
|
||||||
// Set width / height
|
// Set width / height
|
||||||
go.transform.localScale = new Vector3(monitor.widthMeter, go.transform.localScale.y, monitor.heightMeter);
|
if (meshForwardDirection == MeshForwardDirection.Y) {
|
||||||
|
go.transform.localScale = new Vector3(monitor.widthMeter, go.transform.localScale.y, monitor.heightMeter);
|
||||||
|
} else {
|
||||||
|
go.transform.localScale = new Vector3(monitor.widthMeter, monitor.heightMeter, go.transform.localScale.z);
|
||||||
|
}
|
||||||
|
|
||||||
// Set parent as this object
|
// Set parent as this object
|
||||||
go.transform.SetParent(transform);
|
go.transform.SetParent(transform);
|
||||||
|
|||||||
@@ -36,7 +36,11 @@ public class MultipleMonitorRoundLayouter : MultipleMonitorLayouter
|
|||||||
uddTex.transform.localRotation = Quaternion.AngleAxis(angle * Mathf.Rad2Deg, Vector3.up) * info.originalRotation;
|
uddTex.transform.localRotation = Quaternion.AngleAxis(angle * Mathf.Rad2Deg, Vector3.up) * info.originalRotation;
|
||||||
angle += (width * 0.5f + margin) / radius;
|
angle += (width * 0.5f + margin) / radius;
|
||||||
|
|
||||||
uddTex.bend = uDesktopDuplication.Texture.Bend.Y;
|
if (creator_.meshForwardDirection == MultipleMonitorCreator.MeshForwardDirection.Y) {
|
||||||
|
uddTex.bend = uDesktopDuplication.Texture.Bend.Y;
|
||||||
|
} else {
|
||||||
|
uddTex.bend = uDesktopDuplication.Texture.Bend.Z;
|
||||||
|
}
|
||||||
uddTex.radius = radius;
|
uddTex.radius = radius;
|
||||||
uddTex.width = uddTex.monitor.widthMeter;
|
uddTex.width = uddTex.monitor.widthMeter;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,9 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 75494e992a22ea44d9b614d7fd3dc235
|
||||||
|
folderAsset: yes
|
||||||
|
timeCreated: 1478887431
|
||||||
|
licenseType: Pro
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
@@ -0,0 +1,78 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d6b30b913257fee4d8246bf7a2620fcd
|
||||||
|
timeCreated: 1478887431
|
||||||
|
licenseType: Pro
|
||||||
|
ModelImporter:
|
||||||
|
serializedVersion: 19
|
||||||
|
fileIDToRecycleName:
|
||||||
|
100000: //RootNode
|
||||||
|
400000: //RootNode
|
||||||
|
2300000: //RootNode
|
||||||
|
3300000: //RootNode
|
||||||
|
4300000: pCube1
|
||||||
|
4300002: uDD_Board
|
||||||
|
9500000: //RootNode
|
||||||
|
materials:
|
||||||
|
importMaterials: 0
|
||||||
|
materialName: 0
|
||||||
|
materialSearch: 1
|
||||||
|
animations:
|
||||||
|
legacyGenerateAnimations: 4
|
||||||
|
bakeSimulation: 0
|
||||||
|
resampleCurves: 1
|
||||||
|
optimizeGameObjects: 0
|
||||||
|
motionNodeName:
|
||||||
|
animationImportErrors:
|
||||||
|
animationImportWarnings:
|
||||||
|
animationRetargetingWarnings:
|
||||||
|
animationDoRetargetingWarnings: 0
|
||||||
|
animationCompression: 1
|
||||||
|
animationRotationError: 0.5
|
||||||
|
animationPositionError: 0.5
|
||||||
|
animationScaleError: 0.5
|
||||||
|
animationWrapMode: 0
|
||||||
|
extraExposedTransformPaths: []
|
||||||
|
clipAnimations: []
|
||||||
|
isReadable: 0
|
||||||
|
meshes:
|
||||||
|
lODScreenPercentages: []
|
||||||
|
globalScale: 0.1
|
||||||
|
meshCompression: 0
|
||||||
|
addColliders: 0
|
||||||
|
importBlendShapes: 1
|
||||||
|
swapUVChannels: 0
|
||||||
|
generateSecondaryUV: 0
|
||||||
|
useFileUnits: 1
|
||||||
|
optimizeMeshForGPU: 1
|
||||||
|
keepQuads: 0
|
||||||
|
weldVertices: 1
|
||||||
|
secondaryUVAngleDistortion: 8
|
||||||
|
secondaryUVAreaDistortion: 15.000001
|
||||||
|
secondaryUVHardAngle: 88
|
||||||
|
secondaryUVPackMargin: 4
|
||||||
|
useFileScale: 1
|
||||||
|
tangentSpace:
|
||||||
|
normalSmoothAngle: 60
|
||||||
|
normalImportMode: 0
|
||||||
|
tangentImportMode: 2
|
||||||
|
importAnimation: 0
|
||||||
|
copyAvatar: 0
|
||||||
|
humanDescription:
|
||||||
|
human: []
|
||||||
|
skeleton: []
|
||||||
|
armTwist: 0.5
|
||||||
|
foreArmTwist: 0.5
|
||||||
|
upperLegTwist: 0.5
|
||||||
|
legTwist: 0.5
|
||||||
|
armStretch: 0.05
|
||||||
|
legStretch: 0.05
|
||||||
|
feetSpacing: 0
|
||||||
|
rootMotionBoneName:
|
||||||
|
hasTranslationDoF: 0
|
||||||
|
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||||
|
animationType: 0
|
||||||
|
humanoidOversampling: 1
|
||||||
|
additionalBone: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -92,4 +92,22 @@ inline fixed4 uddGetScreenTextureWithCursor(float2 uv)
|
|||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void uddBendVertex(inout float4 v, half radius, half width)
|
||||||
|
{
|
||||||
|
#if !defined(_BEND_OFF)
|
||||||
|
#ifdef _BEND_Y
|
||||||
|
radius = radius - v.y;
|
||||||
|
#elif _BEND_Z
|
||||||
|
radius = radius - v.z;
|
||||||
|
#endif
|
||||||
|
half angle = width * v.x / radius;
|
||||||
|
v.x = radius * sin(angle) / width;
|
||||||
|
#ifdef _BEND_Y
|
||||||
|
v.y += radius * (1 - cos(angle));
|
||||||
|
#elif _BEND_Z
|
||||||
|
v.z -= radius * (1 - cos(angle));
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -7,7 +7,7 @@ Properties
|
|||||||
_MainTex ("Texture", 2D) = "white" {}
|
_MainTex ("Texture", 2D) = "white" {}
|
||||||
_CursorTex ("Cursor Texture", 2D) = "white" {}
|
_CursorTex ("Cursor Texture", 2D) = "white" {}
|
||||||
[KeywordEnum(Off, Y, Z)] _Bend("Bending", Int) = 0
|
[KeywordEnum(Off, Y, Z)] _Bend("Bending", Int) = 0
|
||||||
[PowerSlider(10.0)]_Radius ("Radius", Range(1, 100)) = 30
|
[PowerSlider(10.0)] _Radius("Radius", Range(1, 100)) = 30
|
||||||
[KeywordEnum(Off, Front, Back)] _Cull("Culling", Int) = 2
|
[KeywordEnum(Off, Front, Back)] _Cull("Culling", Int) = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,15 +28,7 @@ half _Width;
|
|||||||
v2f vert(appdata v)
|
v2f vert(appdata v)
|
||||||
{
|
{
|
||||||
v2f o;
|
v2f o;
|
||||||
#if defined(_BEND_Z) || defined(_BEND_Y)
|
uddBendVertex(v.vertex, _Radius, _Width);
|
||||||
half a = _Width * v.vertex.x / _Radius;
|
|
||||||
v.vertex.x = _Radius * sin(a) / _Width;
|
|
||||||
#ifdef _BEND_Y
|
|
||||||
v.vertex.y += _Radius * (1 - cos(a));
|
|
||||||
#elif _BEND_Z
|
|
||||||
v.vertex.z += _Radius * (1 - cos(a));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||||
return o;
|
return o;
|
||||||
|
|||||||
@@ -23,10 +23,13 @@ CGINCLUDE
|
|||||||
#include "./uDD_Common.cginc"
|
#include "./uDD_Common.cginc"
|
||||||
|
|
||||||
fixed _Mask;
|
fixed _Mask;
|
||||||
|
half _Radius;
|
||||||
|
half _Width;
|
||||||
|
|
||||||
v2f vert(appdata v)
|
v2f vert(appdata v)
|
||||||
{
|
{
|
||||||
v2f o;
|
v2f o;
|
||||||
|
uddBendVertex(v.vertex, _Radius, _Width);
|
||||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||||
return o;
|
return o;
|
||||||
@@ -51,6 +54,7 @@ Pass
|
|||||||
#pragma multi_compile ___ ROTATE90 ROTATE180 ROTATE270
|
#pragma multi_compile ___ ROTATE90 ROTATE180 ROTATE270
|
||||||
#pragma multi_compile ___ USE_BEND
|
#pragma multi_compile ___ USE_BEND
|
||||||
#pragma multi_compile ___ USE_CLIP
|
#pragma multi_compile ___ USE_CLIP
|
||||||
|
#pragma multi_compile _BEND_OFF _BEND_Y _BEND_Z
|
||||||
ENDCG
|
ENDCG
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,13 @@ CGINCLUDE
|
|||||||
|
|
||||||
#include "./uDD_Common.cginc"
|
#include "./uDD_Common.cginc"
|
||||||
|
|
||||||
|
half _Radius;
|
||||||
|
half _Width;
|
||||||
|
|
||||||
v2f vert(appdata v)
|
v2f vert(appdata v)
|
||||||
{
|
{
|
||||||
v2f o;
|
v2f o;
|
||||||
|
uddBendVertex(v.vertex, _Radius, _Width);
|
||||||
o.vertex = UnityObjectToClipPos(v.vertex);
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
o.uv = TRANSFORM_TEX(v.uv, _MainTex);
|
||||||
return o;
|
return o;
|
||||||
@@ -46,6 +50,7 @@ Pass
|
|||||||
#pragma multi_compile ___ ROTATE90 ROTATE180 ROTATE270
|
#pragma multi_compile ___ ROTATE90 ROTATE180 ROTATE270
|
||||||
#pragma multi_compile ___ USE_BEND
|
#pragma multi_compile ___ USE_BEND
|
||||||
#pragma multi_compile ___ USE_CLIP
|
#pragma multi_compile ___ USE_CLIP
|
||||||
|
#pragma multi_compile _BEND_OFF _BEND_Y _BEND_Z
|
||||||
ENDCG
|
ENDCG
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user