Skip to content

Commit 3b5bd85

Browse files
committed
Fixed wrong edge transparency after certain filters.
1 parent 1175d68 commit 3b5bd85

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ $$
155155

156156
## 改版履歴
157157

158+
- **v1.02 (for beta3)** (2025-07-24)
159+
160+
- `リサイズ` など一部フィルタ効果の直後に適用した場合,`サイズ固定` が OFF でもオブジェクト外周が透明にならずに塗りつぶしされていたのを修正.
161+
- HLSL の Sampler の設定が一部フィルタ効果によって変更されるのが原因?
162+
158163
- **v1.01 (for beta3)** (2025-07-20)
159164

160165
- `拡大率``色収差強さ` の精度を 1 桁追加.

RadRotDirBlur_S.anm2

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ SOFTWARE.
2222

2323
https://mit-license.org/
2424
]]
25-
--information:RadRotDirBlur_S v1.01 (for beta3) by σ軸
25+
--information:RadRotDirBlur_S v1.02 (for beta3) by σ軸
2626
--label:ぼかし
2727
--track0:移動X,-4000,4000,0,0.01
2828
--track1:移動Y,-4000,4000,0,0.01
@@ -58,7 +58,8 @@ const static float2 lbd = 0.5 / size, ubd = 1.0 - lbd;
5858
SamplerState s;
5959
float4 pick_color(float2 pos)
6060
{
61-
return src.Sample(s, lerp(pos, clamp(pos, lbd, ubd), mode_outer));
61+
float2 t = saturate(size * min(pos, 1 - pos) + 0.5);
62+
return max(t.x * t.y, mode_outer) * src.Sample(s, clamp(pos, lbd, ubd));
6263
}
6364
float4 apply(float4 pos : SV_Position) : SV_Target
6465
{
@@ -100,7 +101,8 @@ const static float2 lbd = 0.5 / size, ubd = 1.0 - lbd;
100101
SamplerState s;
101102
float4 pick_color(float2 pos)
102103
{
103-
return src.Sample(s, lerp(pos, clamp(pos, lbd, ubd), mode_outer));
104+
float2 t = saturate(size * min(pos, 1 - pos) + 0.5);
105+
return max(t.x * t.y, mode_outer) * src.Sample(s, clamp(pos, lbd, ubd));
104106
}
105107
float4 apply_chroma(float4 pos : SV_Position) : SV_Target
106108
{

0 commit comments

Comments
 (0)