Merge branch 'master' of https://git.hoshino.fan/Soullies/ichni_Official
This commit is contained in:
@@ -213,7 +213,7 @@ Material:
|
||||
- _Dst: 10
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EdgeValue: 0.93644387
|
||||
- _EdgeValue: 0.30297375
|
||||
- _EnvironmentReflections: 1
|
||||
- _FNLfanxiangkaiguan: 0
|
||||
- _Face: 1
|
||||
@@ -258,7 +258,7 @@ Material:
|
||||
- _Mask_scale: 1
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Opacity: 0.063556135
|
||||
- _Opacity: 0.69702625
|
||||
- _Parallax: 0.005
|
||||
- _Pass: 0
|
||||
- _QueueOffset: 0
|
||||
|
||||
8
Assets/AddressableAssetsData/Android.meta
Normal file
8
Assets/AddressableAssetsData/Android.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: de233eed6b857cc4b9577804ccd84680
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3977ac8aeca6a7342901ef341d55891d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/AddressableAssetsData/ProfileDataSourceSettings.asset
LFS
Normal file
BIN
Assets/AddressableAssetsData/ProfileDataSourceSettings.asset
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59fa770367ea1e247bb76f22eab57a75
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
BIN
Assets/FR2_Cache.asset
LFS
BIN
Assets/FR2_Cache.asset
LFS
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
€(<28>œx5¿f<C2BF>‰^‰%œd¤ Ü~æQF¦™à°ÉO(DÓ¶H‘ð#‰ƒ²s?':°)8á<>šðGþtáÔK"MŠþس݃"ódgÿÖ‘"à'áª;y
|
||||
F.Ю|[…=Eб•gјTЬъЄѕЙcяп—иNНTJ)Ё—L«Ра њt’Лв@€CB6Њ©ф…ф{<+В$ и.fDЭ=5%Т•AЙeV|я8ъћЦ‡mЌсџ2FЙu4љ$K)lsQ)dnРЏr
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
!ÕØ!éÆLú²«Ñ sð4Kš8’fHw7éL -à8Lv<4C>»Ò³<ª½ Cw=åò-êIa±øÙ@ðï—â©<C3A2>†TùNr]ç)N}+µ$ŠÏΑPT"á²CwÊF<C38A>ŠNnÏ%eç 1k<31>ÁýŠ3<>`vè59›È‚ô ŸJÀ;óÕá¡ra0C$ÁеrÉèÙcAIhO»í8A7úõËå¸Ñ7£Á.Al~ ',–…ÒtØ0²KL¶ÌŒ<C38C>7õbmþÄø¡¯?މù Z6ŽÖ¥
|
||||
߇X’DWť*=ßŢ@Ć·żçmrżáď nť}aŐ[‹dlmqŁ™ăK«k$Ü޵¦›8ČEéZ—M/ç#Ě!0ę
|
||||
Binary file not shown.
@@ -4,8 +4,8 @@ namespace Ichni.RhythmGame.Beatmap
|
||||
{
|
||||
public class PixelateEffect_BM : EffectBase_BM
|
||||
{
|
||||
public float bottomX;
|
||||
public float bottomY;
|
||||
[Range(0f, 1f)] public float bottomX;
|
||||
[Range(0f, 1f)] public float bottomY;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
public PixelateEffect_BM() { }
|
||||
@@ -13,8 +13,8 @@ namespace Ichni.RhythmGame.Beatmap
|
||||
public PixelateEffect_BM(float effectTime, float bottomX, float bottomY, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = effectTime;
|
||||
this.bottomX = bottomX;
|
||||
this.bottomY = bottomY;
|
||||
this.bottomX = Mathf.Clamp01(bottomX);
|
||||
this.bottomY = Mathf.Clamp01(bottomY);
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ namespace Ichni.RhythmGame
|
||||
public class PixelateEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float bottomX;
|
||||
public float bottomY;
|
||||
[Range(0f, 1f)] public float bottomX;
|
||||
[Range(0f, 1f)] public float bottomY;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
private PixelateVolume _pixelateVolume;
|
||||
@@ -19,8 +19,8 @@ namespace Ichni.RhythmGame
|
||||
: base(effectTime) // 激活受控时间分段
|
||||
{
|
||||
this.effectTime = effectTime;
|
||||
this.bottomX = bottomX;
|
||||
this.bottomY = bottomY;
|
||||
this.bottomX = Mathf.Clamp01(bottomX);
|
||||
this.bottomY = Mathf.Clamp01(bottomY);
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ namespace Ichni.RhythmGame
|
||||
if (_pixelateVolume != null)
|
||||
{
|
||||
_pixelateVolume.forceActive.value = true;
|
||||
_pixelateVolume.strengthX.value = Screen.width;
|
||||
_pixelateVolume.strengthY.value = Screen.height;
|
||||
_pixelateVolume.strengthX.value = 1f;
|
||||
_pixelateVolume.strengthY.value = 1f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,9 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
if (_pixelateVolume != null)
|
||||
{
|
||||
float x = Mathf.Lerp(Screen.width, bottomX, intensityCurve.Evaluate(effectProgressPercent));
|
||||
float y = Mathf.Lerp(Screen.height, bottomY, intensityCurve.Evaluate(effectProgressPercent));
|
||||
float progress = intensityCurve == null ? effectProgressPercent : intensityCurve.Evaluate(effectProgressPercent);
|
||||
float x = Mathf.Lerp(1f, Mathf.Clamp01(bottomX), progress);
|
||||
float y = Mathf.Lerp(1f, Mathf.Clamp01(bottomY), progress);
|
||||
|
||||
_pixelateVolume.strengthX.value = x;
|
||||
_pixelateVolume.strengthY.value = y;
|
||||
@@ -67,8 +68,8 @@ namespace Ichni.RhythmGame
|
||||
if (_pixelateVolume != null)
|
||||
{
|
||||
_pixelateVolume.forceActive.value = false;
|
||||
_pixelateVolume.strengthX.value = Screen.width;
|
||||
_pixelateVolume.strengthY.value = Screen.height;
|
||||
_pixelateVolume.strengthX.value = 1f;
|
||||
_pixelateVolume.strengthY.value = 1f;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
Binary file not shown.
@@ -23,15 +23,14 @@ Shader "Hidden/Custom/Pixelate"
|
||||
half4 Frag(Varyings input) : SV_Target
|
||||
{
|
||||
float2 uv = input.texcoord;
|
||||
float2 strength = float2(_PixelateStrengthX, _PixelateStrengthY);
|
||||
|
||||
// 防止除数为0的极小可能崩溃
|
||||
strength = max(strength, float2(1.0, 1.0));
|
||||
float2 resolutionRatio = saturate(float2(_PixelateStrengthX, _PixelateStrengthY));
|
||||
// 使用当前渲染目标分辨率,而不是设备固定分辨率,兼容动态分辨率和渲染缩放。
|
||||
float2 targetResolution = max(floor(_ScreenParams.xy * resolutionRatio), float2(1.0, 1.0));
|
||||
|
||||
float2 uvScaled = uv * strength;
|
||||
float2 uvScaled = uv * targetResolution;
|
||||
float2 uvFloor = floor(uvScaled);
|
||||
float2 uvCenter = uvFloor + 0.5;
|
||||
float2 uvPixelated = uvCenter / strength;
|
||||
float2 uvPixelated = uvCenter / targetResolution;
|
||||
|
||||
// Blitter框架将自动把 SourceTexture 注入为 _BlitTexture
|
||||
return SAMPLE_TEXTURE2D_X(_BlitTexture, sampler_LinearClamp, uvPixelated);
|
||||
|
||||
@@ -15,9 +15,12 @@ namespace SLSUtilities.Rendering.PostProcessing
|
||||
|
||||
[Tooltip("是否强制开启像素化效果")]
|
||||
public BoolParameter forceActive = new BoolParameter(false);
|
||||
|
||||
public FloatParameter strengthX = new FloatParameter(1920f);
|
||||
public FloatParameter strengthY = new FloatParameter(1080f);
|
||||
|
||||
[Tooltip("横向分辨率比例,0 到 1;1 为当前渲染分辨率")]
|
||||
public FloatParameter strengthX = new FloatParameter(1f);
|
||||
|
||||
[Tooltip("纵向分辨率比例,0 到 1;1 为当前渲染分辨率")]
|
||||
public FloatParameter strengthY = new FloatParameter(1f);
|
||||
|
||||
// 返回我们在 Shader 里定义的名字,保证管家可以据此获取材质
|
||||
public override string GetShaderName() => "Hidden/Custom/Pixelate";
|
||||
@@ -32,11 +35,11 @@ namespace SLSUtilities.Rendering.PostProcessing
|
||||
{
|
||||
if (material == null) return;
|
||||
|
||||
cmd.SetGlobalFloat(InternalShaderHelpers.ID._PixelateStrengthX, strengthX.value);
|
||||
cmd.SetGlobalFloat(InternalShaderHelpers.ID._PixelateStrengthY, strengthY.value);
|
||||
cmd.SetGlobalFloat(InternalShaderHelpers.ID._PixelateStrengthX, Mathf.Clamp01(strengthX.value));
|
||||
cmd.SetGlobalFloat(InternalShaderHelpers.ID._PixelateStrengthY, Mathf.Clamp01(strengthY.value));
|
||||
|
||||
// 使用你的统一管家分发的 Blitter 进行优雅渲染
|
||||
Blitter.BlitCameraTexture(cmd, source, destination, material, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user