fix stencil pass
This commit is contained in:
@@ -4,6 +4,7 @@ using EscapeRoomEngine.Engine.Runtime.Modules;
|
||||
using EscapeRoomEngine.Engine.Runtime.Utilities;
|
||||
using NaughtyAttributes;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace EscapeRoomEngine.Portal.Runtime
|
||||
{
|
||||
@@ -12,9 +13,10 @@ namespace EscapeRoomEngine.Portal.Runtime
|
||||
/// </summary>
|
||||
public class Portal : DoorState
|
||||
{
|
||||
private static readonly int PortalNumberProperty = Shader.PropertyToID("_PortalNumber");
|
||||
public static readonly Matrix4x4 HalfRotation = Matrix4x4.Rotate(Quaternion.Euler(0, 180, 0));
|
||||
|
||||
private static int _portalCounter;
|
||||
private static int _portalCounter = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The portal that is connected with this one.
|
||||
@@ -40,6 +42,7 @@ namespace EscapeRoomEngine.Portal.Runtime
|
||||
protected virtual void Awake()
|
||||
{
|
||||
PortalNumber = _portalCounter++;
|
||||
screen.material.SetInt(PortalNumberProperty, PortalNumber);
|
||||
|
||||
DoorEvent += (_, type) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user