mirror of
https://github.com/0x7c13/Pal3.Unity.git
synced 2026-11-27 18:08:09 +08:00
Workaround on iOS to enable SSAO without affecting blur shader on startup
This commit is contained in:
1 parent
188056e260
commit
cfcf7fd493
3 files changed
+17
-1
No files matched your search
+1
-1
@@ -104,7 +104,7 @@ Shader "Pal3/RoundedFrostedGlass"
|
||||
float4 _MultiplyColor;
|
||||
float4 _WidthHeightRadius;
|
||||
|
||||
half4 frag( v2f i ) : COLOR
|
||||
half4 frag(v2f i) : COLOR
|
||||
{
|
||||
const float alpha = CalcAlpha(i.uvmain, _WidthHeightRadius.xy, _WidthHeightRadius.z);
|
||||
half4 cutoffColor = mixAlpha(tex2D(_MainTex, i.uvmain), _AdditiveColor, alpha);
|
||||
File renamed without changes.
@@ -6,6 +6,7 @@
|
||||
namespace Pal3.Effect.PostProcessing
|
||||
{
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Command;
|
||||
using Command.InternalCommands;
|
||||
using Command.SceCommands;
|
||||
@@ -60,6 +61,21 @@ namespace Pal3.Effect.PostProcessing
|
||||
TogglePostProcessLayerWhenNeeded();
|
||||
}
|
||||
|
||||
#if UNITY_IOS
|
||||
// On iOS, the SSAO is causing the RoundedFrostedGlass shader to malfunction.
|
||||
// This is a workaround to disable and re-enable SSAO to fix the issue.
|
||||
private IEnumerator Start()
|
||||
{
|
||||
if (_gameSettings.IsAmbientOcclusionEnabled)
|
||||
{
|
||||
yield return null;
|
||||
_gameSettings.IsAmbientOcclusionEnabled = false;
|
||||
yield return null;
|
||||
_gameSettings.IsAmbientOcclusionEnabled = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private void ToggleBloomBasedOnSetting()
|
||||
{
|
||||
if (_gameSettings.IsRealtimeLightingAndShadowsEnabled)
|
||||
|
||||
Reference in new issue
Block a user