mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
Stickers: fixed shader replacement hitting stickers
This commit is contained in:
parent
958f07ed08
commit
af00f4c6d0
3 changed files with 15 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
using ABI_RC.Core.InteractionSystem;
|
||||
using ABI_RC.Core;
|
||||
using ABI_RC.Core.InteractionSystem;
|
||||
using ABI_RC.Core.IO;
|
||||
using ABI_RC.Core.Player;
|
||||
using ABI_RC.Core.Savior;
|
||||
|
@ -48,4 +49,15 @@ internal static class ShaderFilterHelperPatches
|
|||
StickerMod.Logger.Warning("ExperimentalShaderLimitEnabled found to be true. Disabling setting to prevent crashes when spawning stickers!");
|
||||
MetaPort.Instance.settings.SetSettingsBool("ExperimentalShaderLimitEnabled", false);
|
||||
}
|
||||
}
|
||||
|
||||
internal static class CVRToolsPatches
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(CVRTools), nameof(CVRTools.ReplaceShaders), typeof(Material), typeof(string))]
|
||||
private static bool Prefix_CVRTools_ReplaceShaders(Material material, string fallbackShaderName = "")
|
||||
{
|
||||
if (material == null || material.shader == null) return true;
|
||||
return material.shader != StickerMod.DecalSimpleShader; // prevent replacing decals with fallback shader
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue