Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
Added LIV SDKv1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffanDonal committed Jan 26, 2021
1 parent c5fb867 commit aed78f1
Show file tree
Hide file tree
Showing 55 changed files with 5,029 additions and 8 deletions.
9 changes: 9 additions & 0 deletions Assets/LIV.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions Assets/LIV/LIV Camera.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2411261625838844195
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1893882771999478384}
- component: {fileID: 55574840757722984}
m_Layer: 0
m_Name: LIV Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1893882771999478384
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2411261625838844195}
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: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &55574840757722984
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2411261625838844195}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_GateFitMode: 2
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.2
far clip plane: 10000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
7 changes: 7 additions & 0 deletions Assets/LIV/LIV Camera.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/LIV/Plugins.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/LIV/Plugins/x64.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Assets/LIV/Plugins/x64/LIV_Bridge.dll
Binary file not shown.
69 changes: 69 additions & 0 deletions Assets/LIV/Plugins/x64/LIV_Bridge.dll.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/LIV/Resources.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/LIV/Resources/Shaders.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

90 changes: 90 additions & 0 deletions Assets/LIV/Resources/Shaders/LIV_ClipPlaneComplex.shader
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
Shader "Hidden/LIV_ClipPlaneComplex"
{
Properties{
_LivClipPlaneHeightMap("Clip Plane Height Map", 2D) = "black" {}
}

SubShader
{
Tags { "Queue" = "Overlay" "LightMode" = "Always" "IgnoreProjector" = "True" "ForceNoShadowCasting" = "True"}

Pass {
Name "CLIP_PLANE_COMPLEX"
Cull Off
ZWrite On
Blend Off
Fog{ Mode Off }
ColorMask[_LivColorMask]

CGPROGRAM

#pragma target 4.6

#pragma vertex TessellationVertexProgram
#pragma fragment FragmentProgram
#pragma hull HullProgram
#pragma domain DomainProgram

#include "UnityCG.cginc"

sampler2D _LivClipPlaneHeightMap;
float _LivTessellation;

struct VertexData {
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};

struct TessellationFactors {
float edge[4] : SV_TessFactor;
float inside[2] : SV_InsideTessFactor;
};

struct TessellationControlPoint {
float4 vertex : INTERNALTESSPOS;
float2 uv : TEXCOORD0;
};

[domain("quad")]
[outputcontrolpoints(4)]
[outputtopology("triangle_cw")]
[partitioning("fractional_odd")]
[patchconstantfunc("PatchConstantFunction")]
TessellationControlPoint HullProgram(InputPatch<TessellationControlPoint, 4> patch, uint id : SV_OutputControlPointID) {
return patch[id];
}

TessellationFactors PatchConstantFunction(InputPatch<TessellationControlPoint, 4> patch) {
TessellationFactors f;
float t = _LivTessellation;
f.edge[0] = f.edge[1] = f.edge[2] = f.edge[3] = f.inside[0] = f.inside[1] = t;
return f;
}

[domain("quad")]
VertexData DomainProgram(TessellationFactors factors, OutputPatch<TessellationControlPoint, 4> patch, float2 uv : SV_DomainLocation) {
VertexData data;

data.uv = lerp(lerp(patch[0].uv, patch[1].uv, uv.x), lerp(patch[3].uv, patch[2].uv, uv.x), uv.y);
float4 vertex = lerp(lerp(patch[0].vertex, patch[1].vertex, uv.x), lerp(patch[3].vertex, patch[2].vertex, uv.x), uv.y);
vertex.z += tex2Dlod(_LivClipPlaneHeightMap, float4(data.uv, 0, 0)).r;
data.vertex = UnityObjectToClipPos(vertex);

return data;
}

TessellationControlPoint TessellationVertexProgram(VertexData v) {
TessellationControlPoint p;
p.vertex = v.vertex;
p.uv = v.uv;
return p;
}

fixed4 FragmentProgram(TessellationControlPoint i) : SV_Target{
return fixed4(0, 0, 0, 0);
}

ENDCG
}
}
}
9 changes: 9 additions & 0 deletions Assets/LIV/Resources/Shaders/LIV_ClipPlaneComplex.shader.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit aed78f1

Please sign in to comment.