From f3e9da4ccda3c392b9094338e62127fd273405a8 Mon Sep 17 00:00:00 2001
From: CA-Tatami
Date: Thu, 8 Aug 2024 17:32:57 +0900
Subject: [PATCH] =?UTF-8?q?=EF=BC=92=E6=9E=9A=E7=9B=AE=E3=81=AE=E3=83=86?=
=?UTF-8?q?=E3=82=AF=E3=82=B9=E3=83=81=E3=83=A3=E3=81=A8=E3=81=AE=E3=83=96?=
=?UTF-8?q?=E3=83=AC=E3=83=B3=E3=83=89=E6=96=B9=E5=BC=8F=E3=81=AB=E3=81=A4?=
=?UTF-8?q?=E3=81=84=E3=81=A6=E6=96=87=E8=A8=80=E4=BF=AE=E6=AD=A3=EF=BC=9A?=
=?UTF-8?q?Additive=E2=87=92Average?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Core/Scripts/AlphaTransitionBlendMode.cs | 2 +-
.../ParticlesUberUnlitMaterialPostProcessor.cs | 6 +++---
.../Nova/Editor/Core/Scripts/ShaderKeywords.cs | 10 +++++-----
.../Nova/Runtime/Core/Shaders/ParticlesUber.hlsl | 16 ++++++++--------
.../Shaders/ParticlesUberDepthNormalsCore.hlsl | 10 +++++-----
.../Runtime/Core/Shaders/ParticlesUberLit.shader | 12 ++++++------
.../Core/Shaders/ParticlesUberShadowCaster.hlsl | 10 +++++-----
.../Runtime/Core/Shaders/ParticlesUberUnlit.hlsl | 10 +++++-----
.../Core/Shaders/ParticlesUberUnlit.shader | 12 ++++++------
README.md | 2 +-
README_JA.md | 2 +-
11 files changed, 46 insertions(+), 46 deletions(-)
diff --git a/Assets/Nova/Editor/Core/Scripts/AlphaTransitionBlendMode.cs b/Assets/Nova/Editor/Core/Scripts/AlphaTransitionBlendMode.cs
index 7e75ed2..01e703d 100644
--- a/Assets/Nova/Editor/Core/Scripts/AlphaTransitionBlendMode.cs
+++ b/Assets/Nova/Editor/Core/Scripts/AlphaTransitionBlendMode.cs
@@ -7,7 +7,7 @@ namespace Nova.Editor.Core.Scripts
public enum AlphaTransitionBlendMode
{
None,
- Additive,
+ Average,
Multiply
}
}
diff --git a/Assets/Nova/Editor/Core/Scripts/ParticlesUberUnlitMaterialPostProcessor.cs b/Assets/Nova/Editor/Core/Scripts/ParticlesUberUnlitMaterialPostProcessor.cs
index 4c07b74..ddfc8e3 100644
--- a/Assets/Nova/Editor/Core/Scripts/ParticlesUberUnlitMaterialPostProcessor.cs
+++ b/Assets/Nova/Editor/Core/Scripts/ParticlesUberUnlitMaterialPostProcessor.cs
@@ -1,5 +1,5 @@
// --------------------------------------------------------------
-// Copyright 2022 CyberAgent, Inc.
+// Copyright 2024 CyberAgent, Inc.
// --------------------------------------------------------------
using System;
@@ -307,8 +307,8 @@ private static void SetupAlphaTransitionMaterialKeywords(Material material)
|| material.GetTexture(AlphaTransitionMapSecondTexture2DArrayId) != null
|| material.GetTexture(AlphaTransitionMapSecondTexture3DId) != null;
var blendMode = (AlphaTransitionBlendMode)material.GetFloat(AlphaTransitionSecondTextureBlendMode);
- MaterialEditorUtility.SetKeyword(material, ShaderKeywords.AlphaTransitionBlendSecondTexAdditive,
- secondTexEnabled && blendMode == AlphaTransitionBlendMode.Additive);
+ MaterialEditorUtility.SetKeyword(material, ShaderKeywords.AlphaTransitionBlendSecondTexAverage,
+ secondTexEnabled && blendMode == AlphaTransitionBlendMode.Average);
MaterialEditorUtility.SetKeyword(material, ShaderKeywords.AlphaTransitionBlendSecondTexMultiply,
secondTexEnabled && blendMode == AlphaTransitionBlendMode.Multiply);
}
diff --git a/Assets/Nova/Editor/Core/Scripts/ShaderKeywords.cs b/Assets/Nova/Editor/Core/Scripts/ShaderKeywords.cs
index b906ea0..09a1107 100644
--- a/Assets/Nova/Editor/Core/Scripts/ShaderKeywords.cs
+++ b/Assets/Nova/Editor/Core/Scripts/ShaderKeywords.cs
@@ -1,5 +1,5 @@
// --------------------------------------------------------------
-// Copyright 2022 CyberAgent, Inc.
+// Copyright 2024 CyberAgent, Inc.
// --------------------------------------------------------------
using System;
@@ -46,7 +46,7 @@ public static class ShaderKeywords
public const string FlowMapTargetTint = "_FLOW_MAP_TARGET_TINT";
public const string FlowMapTargetEmission = "_FLOW_MAP_TARGET_EMISSION";
public const string FlowMapTargetAlphaTransition = "_FLOW_MAP_TARGET_ALPHA_TRANSITION";
-
+
// Parallax Map
public const string ParallaxMapTargetBase = "_PARALLAX_MAP_TARGET_BASE";
public const string ParallaxMapTargetTint = "_PARALLAX_MAP_TARGET_TINT";
@@ -61,7 +61,7 @@ public static class ShaderKeywords
public const string AlphaTransitionMapMode2D = "_ALPHA_TRANSITION_MAP_MODE_2D";
public const string AlphaTransitionMapMode2DArray = "_ALPHA_TRANSITION_MAP_MODE_2D_ARRAY";
public const string AlphaTransitionMapMode3D = "_ALPHA_TRANSITION_MAP_MODE_3D";
- public const string AlphaTransitionBlendSecondTexAdditive = "_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE";
+ public const string AlphaTransitionBlendSecondTexAverage = "_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE";
public const string AlphaTransitionBlendSecondTexMultiply = "_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY";
// Emission
@@ -80,7 +80,7 @@ public static class ShaderKeywords
public const string TransparencyByLuminance = "_TRANSPARENCY_BY_LUMINANCE";
public const string SoftParticlesEnabled = "_SOFT_PARTICLES_ENABLED";
public const string DepthFadeEnabled = "_DEPTH_FADE_ENABLED";
-
+
// Vertex Deformation
public const string VertexDeformationEnabled = "_VERTEX_DEFORMATION_ENABLED";
@@ -224,4 +224,4 @@ public static string GetShaderKeyword(this ParallaxMapMode parallaxMapMode)
}
}
}
-}
\ No newline at end of file
+}
diff --git a/Assets/Nova/Runtime/Core/Shaders/ParticlesUber.hlsl b/Assets/Nova/Runtime/Core/Shaders/ParticlesUber.hlsl
index a930698..a03c114 100644
--- a/Assets/Nova/Runtime/Core/Shaders/ParticlesUber.hlsl
+++ b/Assets/Nova/Runtime/Core/Shaders/ParticlesUber.hlsl
@@ -349,17 +349,17 @@ SamplerState GetEmissionMapSamplerState()
// Transforms the alpha transition map UV by the scale/bias property
#ifdef _ALPHA_TRANSITION_MAP_MODE_2D
#define TRANSFORM_ALPHA_TRANSITION_MAP(texcoord) TRANSFORM_TEX(texcoord, _AlphaTransitionMap);
-#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
#define TRANSFORM_ALPHA_TRANSITION_MAP_SECOND(texcoord) TRANSFORM_TEX(texcoord, _AlphaTransitionMapSecondTexture);
#endif
#elif _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY
#define TRANSFORM_ALPHA_TRANSITION_MAP(texcoord) TRANSFORM_TEX(texcoord, _AlphaTransitionMap2DArray);
-#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
#define TRANSFORM_ALPHA_TRANSITION_MAP_SECOND(texcoord) TRANSFORM_TEX(texcoord, _AlphaTransitionMapSecondTexture2DArray);
#endif
#elif _ALPHA_TRANSITION_MAP_MODE_3D
#define TRANSFORM_ALPHA_TRANSITION_MAP(texcoord) TRANSFORM_TEX(texcoord, _AlphaTransitionMap3D);
-#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
#define TRANSFORM_ALPHA_TRANSITION_MAP_SECOND(texcoord) TRANSFORM_TEX(texcoord, _AlphaTransitionMapSecondTexture3D);
#endif
#endif
@@ -461,17 +461,17 @@ void ApplyColorCorrection(in out float3 color)
// Sample the alpha transition map.
#ifdef _ALPHA_TRANSITION_MAP_MODE_2D
#define SAMPLE_ALPHA_TRANSITION_MAP(uv, progress) SAMPLE_TEXTURE2D(_AlphaTransitionMap, sampler_AlphaTransitionMap, uv);
-#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
#define SAMPLE_ALPHA_TRANSITION_MAP_SECOND(uv, progress) SAMPLE_TEXTURE2D(_AlphaTransitionMapSecondTexture, sampler_AlphaTransitionMapSecondTexture, uv);
#endif
#elif _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY
#define SAMPLE_ALPHA_TRANSITION_MAP(uv, progress) SAMPLE_TEXTURE2D_ARRAY(_AlphaTransitionMap2DArray, sampler_AlphaTransitionMap2DArray, uv, progress);
-#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
#define SAMPLE_ALPHA_TRANSITION_MAP_SECOND(uv, progress) SAMPLE_TEXTURE2D_ARRAY(_AlphaTransitionMapSecondTexture2DArray, sampler_AlphaTransitionMapSecondTexture2DArray, uv, progress);
#endif
#elif _ALPHA_TRANSITION_MAP_MODE_3D
#define SAMPLE_ALPHA_TRANSITION_MAP(uv, progress) SAMPLE_TEXTURE3D_LOD(_AlphaTransitionMap3D, sampler_AlphaTransitionMap3D, float3(uv, progress), 0);
-#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
#define SAMPLE_ALPHA_TRANSITION_MAP_SECOND(uv, progress) SAMPLE_TEXTURE3D_LOD(_AlphaTransitionMapSecondTexture3D, sampler_AlphaTransitionMapSecondTexture3D, float3(uv, progress), 0);
#endif
#endif
@@ -506,7 +506,7 @@ half GetTransitionAlphaImpl(half4 map, uint channel, half transitionProgress, fl
return ApplyAlphaTransitionProgress(transitionAlpha, transitionProgress, dissolveSharpness);
}
-#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
half GetTransitionAlpha(half2 transitionMapUv, half transitionMapProgress, half transitionProgress, half2 transitionMapSecondUv, half transitionProgressSecond)
{
half4 mainTexMap = SAMPLE_ALPHA_TRANSITION_MAP(transitionMapUv, transitionMapProgress);
@@ -514,7 +514,7 @@ half GetTransitionAlpha(half2 transitionMapUv, half transitionMapProgress, half
half mainTexAlpha = GetTransitionAlphaImpl(mainTexMap, (uint)_AlphaTransitionMapChannelsX, transitionProgress, _DissolveSharpness);
half secondTexAlpha = GetTransitionAlphaImpl(secondTexMap, (uint)_AlphaTransitionMapSecondTextureChannelsX, transitionProgressSecond, _DissolveSharpnessSecondTexture);
-#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE)
+#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE)
mainTexAlpha = (mainTexAlpha + secondTexAlpha) * 0.5;
#endif
#if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
diff --git a/Assets/Nova/Runtime/Core/Shaders/ParticlesUberDepthNormalsCore.hlsl b/Assets/Nova/Runtime/Core/Shaders/ParticlesUberDepthNormalsCore.hlsl
index bcf8f96..7ab437e 100644
--- a/Assets/Nova/Runtime/Core/Shaders/ParticlesUberDepthNormalsCore.hlsl
+++ b/Assets/Nova/Runtime/Core/Shaders/ParticlesUberDepthNormalsCore.hlsl
@@ -105,7 +105,7 @@ struct VaryingsDrawDepth
#endif
#endif
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
float4 flowTransitionSecondUVs : TEXCOORD8; // xy: FlowMap UV, zw: TransitionMap UV
#endif
@@ -200,7 +200,7 @@ VaryingsDrawDepth vert(AttributesDrawDepth input)
output.flowTransitionUVs.zw = TRANSFORM_ALPHA_TRANSITION_MAP(input.texcoord.xy);
output.flowTransitionUVs.z += GET_CUSTOM_COORD(_AlphaTransitionMapOffsetXCoord)
output.flowTransitionUVs.w += GET_CUSTOM_COORD(_AlphaTransitionMapOffsetYCoord)
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
output.flowTransitionSecondUVs.zw = TRANSFORM_ALPHA_TRANSITION_MAP_SECOND(input.texcoord.xy);
output.flowTransitionSecondUVs.z += GET_CUSTOM_COORD(_AlphaTransitionMapSecondTextureOffsetXCoord)
output.flowTransitionSecondUVs.w += GET_CUSTOM_COORD(_AlphaTransitionMapSecondTextureOffsetYCoord)
@@ -233,7 +233,7 @@ VaryingsDrawDepth vert(AttributesDrawDepth input)
// Transition Map Progress
#if defined(_ALPHA_TRANSITION_MAP_MODE_2D_ARRAY) || defined(_ALPHA_TRANSITION_MAP_MODE_2D_ARRAY)
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
float transitionMapProgress = _AlphaTransitionMapSecondTextureProgress + GET_CUSTOM_COORD(_AlphaTransitionMapSecondTextureProgressCoord);
float sliceCount = _AlphaTransitionMapSecondTextureSliceCount;
#else
@@ -308,7 +308,7 @@ half4 frag(VaryingsDrawDepth input) : SV_Target
#endif
#ifdef _FLOW_MAP_TARGET_ALPHA_TRANSITION
input.flowTransitionUVs.zw += flowMapUvOffset;
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
input.flowTransitionSecondUVs.zw += flowMapUvOffset;
#endif
#endif
@@ -334,7 +334,7 @@ half4 frag(VaryingsDrawDepth input) : SV_Target
#ifdef _USE_TRANSITION_MAP
half alphaTransitionProgress = _AlphaTransitionProgress + GET_CUSTOM_COORD(_AlphaTransitionProgressCoord);
ModulateAlphaTransitionProgress(alphaTransitionProgress, input.color.a);
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
half alphaTransitionProgressSecondTexture = _AlphaTransitionProgressSecondTexture + GET_CUSTOM_COORD(_AlphaTransitionProgressCoordSecondTexture);
ModulateAlphaTransitionProgress(alphaTransitionProgressSecondTexture, input.color.a);
color.a *= GetTransitionAlpha(input.flowTransitionUVs.zw, input.transitionEmissionProgresses.x, alphaTransitionProgress, input.flowTransitionSecondUVs.zw, alphaTransitionProgressSecondTexture);
diff --git a/Assets/Nova/Runtime/Core/Shaders/ParticlesUberLit.shader b/Assets/Nova/Runtime/Core/Shaders/ParticlesUberLit.shader
index 648f7c8..f9a258f 100644
--- a/Assets/Nova/Runtime/Core/Shaders/ParticlesUberLit.shader
+++ b/Assets/Nova/Runtime/Core/Shaders/ParticlesUberLit.shader
@@ -278,7 +278,7 @@ Shader "Nova/Particles/UberLit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Emission
#pragma shader_feature_local _ _EMISSION_AREA_ALL _EMISSION_AREA_MAP _EMISSION_AREA_ALPHA
@@ -355,7 +355,7 @@ Shader "Nova/Particles/UberLit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Emission
//#pragma shader_feature_local _ _EMISSION_AREA_ALL _EMISSION_AREA_MAP _EMISSION_AREA_ALPHA
@@ -433,7 +433,7 @@ Shader "Nova/Particles/UberLit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Emission
//#pragma shader_feature_local _ _EMISSION_AREA_ALL _EMISSION_AREA_MAP _EMISSION_AREA_ALPHA
@@ -517,7 +517,7 @@ Shader "Nova/Particles/UberLit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Emission
#pragma shader_feature_local _ _EMISSION_AREA_ALL _EMISSION_AREA_MAP _EMISSION_AREA_ALPHA
@@ -595,7 +595,7 @@ Shader "Nova/Particles/UberLit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Emission
#pragma shader_feature_local _ _EMISSION_AREA_ALL _EMISSION_AREA_MAP _EMISSION_AREA_ALPHA
@@ -658,7 +658,7 @@ Shader "Nova/Particles/UberLit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Transparency
#pragma shader_feature_local _TRANSPARENCY_BY_LUMINANCE
diff --git a/Assets/Nova/Runtime/Core/Shaders/ParticlesUberShadowCaster.hlsl b/Assets/Nova/Runtime/Core/Shaders/ParticlesUberShadowCaster.hlsl
index 83c9f70..0109334 100644
--- a/Assets/Nova/Runtime/Core/Shaders/ParticlesUberShadowCaster.hlsl
+++ b/Assets/Nova/Runtime/Core/Shaders/ParticlesUberShadowCaster.hlsl
@@ -37,7 +37,7 @@ struct Varyings
float2 tintUV : TEXCOORD4; // xy: TintMap UV, zw: EmissionMap UV
#endif
float transitionProgress : TEXCOORD5;
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
float4 flowTransitionSecondUVs : TEXCOORD6; // xy: FlowMap UV, zw: TransitionMap UV
#endif
UNITY_VERTEX_INPUT_INSTANCE_ID
@@ -141,7 +141,7 @@ Varyings ShadowPassVertex(Attributes input)
output.flowTransitionUVs.zw = TRANSFORM_ALPHA_TRANSITION_MAP(input.texcoord.xy);
output.flowTransitionUVs.z += GET_CUSTOM_COORD(_AlphaTransitionMapOffsetXCoord)
output.flowTransitionUVs.w += GET_CUSTOM_COORD(_AlphaTransitionMapOffsetYCoord)
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
output.flowTransitionSecondUVs.zw = TRANSFORM_ALPHA_TRANSITION_MAP_SECOND(input.texcoord.xy);
output.flowTransitionSecondUVs.z += GET_CUSTOM_COORD(_AlphaTransitionMapSecondTextureOffsetXCoord)
output.flowTransitionSecondUVs.w += GET_CUSTOM_COORD(_AlphaTransitionMapSecondTextureOffsetYCoord)
@@ -150,7 +150,7 @@ Varyings ShadowPassVertex(Attributes input)
// Transition Map Progress
#if defined(_ALPHA_TRANSITION_MAP_MODE_2D_ARRAY) || defined(_ALPHA_TRANSITION_MAP_MODE_2D_ARRAY)
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
float transitionMapProgress = _AlphaTransitionMapSecondTextureProgress + GET_CUSTOM_COORD(_AlphaTransitionMapSecondTextureProgressCoord);
float sliceCount = _AlphaTransitionMapSecondTextureSliceCount;
#else
@@ -194,7 +194,7 @@ half4 ShadowPassFragment(Varyings input) : SV_TARGET
#endif
#ifdef _FLOW_MAP_TARGET_ALPHA_TRANSITION
input.flowTransitionUVs.zw += flowMapUvOffset;
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
input.flowTransitionSecondUVs.zw += flowMapUvOffset;
#endif
#endif
@@ -223,7 +223,7 @@ half4 ShadowPassFragment(Varyings input) : SV_TARGET
{
half alphaTransitionProgress = _AlphaTransitionProgress + GET_CUSTOM_COORD(_AlphaTransitionProgressCoord);
ModulateAlphaTransitionProgress(alphaTransitionProgress, input.color.a);
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
half alphaTransitionProgressSecondTexture = _AlphaTransitionProgressSecondTexture + GET_CUSTOM_COORD(_AlphaTransitionProgressCoordSecondTexture);
ModulateAlphaTransitionProgress(alphaTransitionProgressSecondTexture, input.color.a);
color.a *= GetTransitionAlpha(input.flowTransitionUVs.zw, input.transitionProgress, alphaTransitionProgress, input.flowTransitionSecondUVs.xy, alphaTransitionProgressSecondTexture);
diff --git a/Assets/Nova/Runtime/Core/Shaders/ParticlesUberUnlit.hlsl b/Assets/Nova/Runtime/Core/Shaders/ParticlesUberUnlit.hlsl
index 9efb7a2..822a621 100644
--- a/Assets/Nova/Runtime/Core/Shaders/ParticlesUberUnlit.hlsl
+++ b/Assets/Nova/Runtime/Core/Shaders/ParticlesUberUnlit.hlsl
@@ -46,7 +46,7 @@ struct Varyings
float3 viewDirTS : TEXCOORD9;
float3 parallaxMapUVAndProgress : TEXCOORD10;
#endif
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
float4 flowTransitionSecondUVs : TEXCOORD11; // xy: FlowMap UV, zw: TransitionMap UV
#endif
UNITY_VERTEX_INPUT_INSTANCE_ID
@@ -169,7 +169,7 @@ Varyings vertUnlit(Attributes input, out float3 positionWS, uniform bool useEmis
output.flowTransitionUVs.zw = TRANSFORM_ALPHA_TRANSITION_MAP(input.texcoord.xy);
output.flowTransitionUVs.z += GET_CUSTOM_COORD(_AlphaTransitionMapOffsetXCoord)
output.flowTransitionUVs.w += GET_CUSTOM_COORD(_AlphaTransitionMapOffsetYCoord)
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
output.flowTransitionSecondUVs.zw = TRANSFORM_ALPHA_TRANSITION_MAP_SECOND(input.texcoord.xy);
output.flowTransitionSecondUVs.z += GET_CUSTOM_COORD(_AlphaTransitionMapSecondTextureOffsetXCoord)
output.flowTransitionSecondUVs.w += GET_CUSTOM_COORD(_AlphaTransitionMapSecondTextureOffsetYCoord)
@@ -178,7 +178,7 @@ Varyings vertUnlit(Attributes input, out float3 positionWS, uniform bool useEmis
// Transition Map Progress
#if defined(_ALPHA_TRANSITION_MAP_MODE_2D_ARRAY) || defined(_ALPHA_TRANSITION_MAP_MODE_2D_ARRAY)
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
float transitionMapProgress = _AlphaTransitionMapSecondTextureProgress + GET_CUSTOM_COORD(_AlphaTransitionMapSecondTextureProgressCoord);
float sliceCount = _AlphaTransitionMapSecondTextureSliceCount;
#else
@@ -249,7 +249,7 @@ half4 fragUnlit(in out Varyings input, uniform bool useEmission)
#endif
#ifdef _FLOW_MAP_TARGET_ALPHA_TRANSITION
input.flowTransitionUVs.zw += flowMapUvOffset;
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
input.flowTransitionSecondUVs.zw += flowMapUvOffset;
#endif
#endif
@@ -300,7 +300,7 @@ half4 fragUnlit(in out Varyings input, uniform bool useEmission)
#if defined(_FADE_TRANSITION_ENABLED) || defined(_DISSOLVE_TRANSITION_ENABLED)
half alphaTransitionProgress = _AlphaTransitionProgress + GET_CUSTOM_COORD(_AlphaTransitionProgressCoord);
ModulateAlphaTransitionProgress(alphaTransitionProgress, input.color.a);
- #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
+ #if defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE) || defined(_ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY)
half alphaTransitionProgressSecondTexture = _AlphaTransitionProgressSecondTexture + GET_CUSTOM_COORD(_AlphaTransitionProgressCoordSecondTexture);
ModulateAlphaTransitionProgress(alphaTransitionProgressSecondTexture, input.color.a);
color.a *= GetTransitionAlpha(input.flowTransitionUVs.zw, input.transitionEmissionProgresses.x, alphaTransitionProgress, input.flowTransitionSecondUVs.zw, alphaTransitionProgressSecondTexture);
diff --git a/Assets/Nova/Runtime/Core/Shaders/ParticlesUberUnlit.shader b/Assets/Nova/Runtime/Core/Shaders/ParticlesUberUnlit.shader
index 1d7a817..f1d31c4 100644
--- a/Assets/Nova/Runtime/Core/Shaders/ParticlesUberUnlit.shader
+++ b/Assets/Nova/Runtime/Core/Shaders/ParticlesUberUnlit.shader
@@ -234,7 +234,7 @@ Shader "Nova/Particles/UberUnlit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Emission
#pragma shader_feature_local _ _EMISSION_AREA_ALL _EMISSION_AREA_MAP _EMISSION_AREA_ALPHA
@@ -310,7 +310,7 @@ Shader "Nova/Particles/UberUnlit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Emission
//#pragma shader_feature_local _ _EMISSION_AREA_ALL _EMISSION_AREA_MAP _EMISSION_AREA_ALPHA
@@ -386,7 +386,7 @@ Shader "Nova/Particles/UberUnlit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Emission
//#pragma shader_feature_local _ _EMISSION_AREA_ALL _EMISSION_AREA_MAP _EMISSION_AREA_ALPHA
@@ -465,7 +465,7 @@ Shader "Nova/Particles/UberUnlit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Emission
#pragma shader_feature_local _ _EMISSION_AREA_ALL _EMISSION_AREA_MAP _EMISSION_AREA_ALPHA
@@ -544,7 +544,7 @@ Shader "Nova/Particles/UberUnlit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Emission
#pragma shader_feature_local _ _EMISSION_AREA_ALL _EMISSION_AREA_MAP _EMISSION_AREA_ALPHA
@@ -605,7 +605,7 @@ Shader "Nova/Particles/UberUnlit"
// Alpha Transition
#pragma shader_feature_local _ _FADE_TRANSITION_ENABLED _DISSOLVE_TRANSITION_ENABLED
#pragma shader_feature_local _ALPHA_TRANSITION_MAP_MODE_2D _ALPHA_TRANSITION_MAP_MODE_2D_ARRAY _ALPHA_TRANSITION_MAP_MODE_3D
- #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_ADDITIVE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
+ #pragma shader_feature_local _ _ALPHA_TRANSITION_BLEND_SECOND_TEX_AVERAGE _ALPHA_TRANSITION_BLEND_SECOND_TEX_MULTIPLY
// Transparency
#pragma shader_feature_local _TRANSPARENCY_BY_LUMINANCE
diff --git a/README.md b/README.md
index 2cd15e5..b4eaf88 100644
--- a/README.md
+++ b/README.md
@@ -248,7 +248,7 @@ You can specify the color blend method from the following options.
- Alpha (Alpha Blending / Default)
-- Additive
+- Average
- Multiply
diff --git a/README_JA.md b/README_JA.md
index b7c6905..c949278 100644
--- a/README_JA.md
+++ b/README_JA.md
@@ -737,7 +737,7 @@ Flip-BookあるいはFlip-Book Blendingの進行度を設定します。
- None: 利用しない(デフォルト)
-- Additive: 加算。2つのテクスチャの平均値を参照します。
+- Average: 平均。2つのテクスチャの平均値を参照します。
- Multiply: 乗算