This commit is contained in:
SoulliesOfficial
2025-09-19 23:39:23 -04:00
parent f612d5bcd4
commit a9bc898e4c
130 changed files with 227554 additions and 24284 deletions

View File

@@ -16,6 +16,7 @@ Shader "XuanXuan/Postprocess/NBPostProcessUber"
_DeSaturateIntensity("饱和度强度",Float) = 0
_Contrast("对比度",Float) = 1
_FlashColor("闪颜色", Vector) = (1, 1, 1, 1)
_BlackFlashColor("闪黑颜色", Vector) = (0, 0, 0, 1)
[HideInInspector] _NBPostProcessFlags("_NBPostProcessFlags", Integer) = 0
@@ -85,7 +86,7 @@ Shader "XuanXuan/Postprocess/NBPostProcessUber"
TEXTURE2D(_TextureOverlayMask);
SAMPLER(sampler_TextureOverlayMask);
#if UNITY_VERSION < 202210
#if UNITY_VERSION < 202220
SAMPLER(sampler_LinearClamp);
#endif
@@ -104,6 +105,7 @@ Shader "XuanXuan/Postprocess/NBPostProcessUber"
half _DeSaturateIntensity;
half _Contrast;
half3 _FlashColor;
half3 _BlackFlashColor;
half4 _ChromaticAberrationVec;
half4 _CustomScreenCenter;
@@ -330,17 +332,18 @@ Shader "XuanXuan/Postprocess/NBPostProcessUber"
UNITY_BRANCH
if(CheckLocalFlags(FLAG_BIT_FLASH))
{
// //因为颜色空间的特殊原因,这里的转换运算可能会造成性能热点,后续考虑优化。
// half3 invertColor = SRGBToLinear(1- LinearToSRGB(color.xyz));
// color.rgb = lerp(color.rgb,invertColor,_InvertIntensity);
half3 endColor = lerp(_BlackFlashColor,_FlashColor,luminance(color.rgb));
color.rgb = lerp(color.rgb,endColor,_InvertIntensity);
color.xyz = RgbToHsv(color.rgb);
half3 colorHSV = color.xyz;
color.y *= _DeSaturateIntensity;
color.rgb = HsvToRgb(color.xyz);
//因为颜色空间的特殊原因,这里的转换运算可能会造成性能热点,后续考虑优化。
half3 invertColor = SRGBToLinear(1- LinearToSRGB(color.xyz));
color.rgb = lerp(color.rgb,invertColor,_InvertIntensity);
half3 endColor = lerp(color,_FlashColor,luminance(color.rgb));
color.rgb = lerp(color.rgb,endColor,_InvertIntensity);
color.rgb = lerp(half3(0.5,0.5,0.5),color.rgb,_Contrast);