render stencil portals (transparent)

This commit is contained in:
2023-03-08 15:39:58 +01:00
parent 02bb0727b7
commit 4be8380a40
14 changed files with 475 additions and 60 deletions

View File

@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: PortalDepth
m_Shader: {fileID: 4800000, guid: 9c438221637f2c0439e5af0dadf1f829, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _PortalNumber: 0
m_Colors: []
m_BuildTextureStacks: []

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b788aaf4ec13aab459f370617052b5c1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,12 @@
Shader "Escape Room Engine/PortalDepth" {
SubShader {
Pass {
ColorMask 0
Stencil {
Ref 1
Comp LEqual
}
}
}
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 9c438221637f2c0439e5af0dadf1f829
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -12,7 +12,7 @@ GameObject:
- component: {fileID: 8547629936759508216}
- component: {fileID: 5871497001431693362}
m_Layer: 7
m_Name: Portal Screen
m_Name: Screen
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -25,14 +25,14 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5366957160841664999}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2246995198243242195}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!33 &8547629936759508216
MeshFilter:
m_ObjectHideFlags: 0
@@ -134,7 +134,6 @@ MonoBehaviour:
linkedPortal: {fileID: 0}
minNearClipPlane: 0.0001
screen: {fileID: 5871497001431693362}
cameraTransform: {fileID: 0}
portalTransform: {fileID: 2246995198243242195}
--- !u!65 &7604291350124895408
BoxCollider:
@@ -182,14 +181,14 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8470391359842711396}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071067}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2246995198243242195}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!33 &5289736326143877755
MeshFilter:
m_ObjectHideFlags: 0