-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using HarmonyLib; | ||
using Unity.Burst; | ||
using UnityEngine.Rendering.HighDefinition; | ||
|
||
namespace LethalPerformance.Patches; | ||
[HarmonyPatch(typeof(HDCamera), nameof(HDCamera.UpdateShaderVariablesXRCB))] | ||
internal static unsafe class Patch_HDCamera | ||
{ | ||
public static readonly Testing.TestDelegate s_TestDelegate = BurstCompiler.CompileFunctionPointer<Testing.TestDelegate>(Testing.Test).Invoke; | ||
|
||
[HarmonyPrefix] | ||
public static unsafe bool Prefix(HDCamera __instance, ref ShaderVariablesXR cb) | ||
{ | ||
fixed (void* p = &cb, views = __instance.m_XRViewConstants) | ||
{ | ||
s_TestDelegate((Testing.ReadableViewConstants*)views, __instance.viewCount, (Testing.ReadableShaderVariablesXR*)p); | ||
|
||
cb = *(ShaderVariablesXR*)p; | ||
return false; | ||
} | ||
} | ||
} |
Empty file.