-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.