物理ベースの色の計算を、sRGBの変換式と光の量での補間にする
・「物理ベース」の色の足し合わせと画素の間の補間を、sRGBの変換式による光の量で行うよう変更-M
このコミットが含まれているのは:
10ファイル変更
+290
-70
検索条件に一致するファイルはありません
@@ -69,6 +69,30 @@ public sealed class SpectrumColorShiftEffectImplTests
|
||||
Assert.Equal(new RawRect(-7, -2, 57, 52), requested);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheLegacyShaderRequestsOnlyTheSourceInput()
|
||||
{
|
||||
var impl = new EffectImpl { Distance = 5f };
|
||||
Map(impl, new RawRect(0, 0, 40, 24));
|
||||
var inputs = new RawRect[2];
|
||||
|
||||
impl.MapOutputRectToInputRects(new RawRect(0, 0, 50, 50), inputs);
|
||||
|
||||
Assert.Equal([new RawRect(-7, -2, 57, 52), default], inputs);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ThePhysicalShaderRequestsOnlyTheLinearizedInput()
|
||||
{
|
||||
var impl = new EffectImpl { Distance = 5f, Physical = 1 };
|
||||
Map(impl, new RawRect(0, 0, 40, 24));
|
||||
var inputs = new RawRect[2];
|
||||
|
||||
impl.MapOutputRectToInputRects(new RawRect(0, 0, 50, 50), inputs);
|
||||
|
||||
Assert.Equal([default, new RawRect(-7, -2, 57, 52)], inputs);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ANoInputRequestIsIgnored()
|
||||
{
|
||||
@@ -103,6 +127,7 @@ public sealed class SpectrumColorShiftEffectImplTests
|
||||
Dispersion = (int)DispersionLaw.Prism,
|
||||
ReferenceWavelength = 480f,
|
||||
Steps = 16,
|
||||
Physical = 1,
|
||||
};
|
||||
|
||||
Assert.Equal(12f, impl.Distance);
|
||||
@@ -114,5 +139,6 @@ public sealed class SpectrumColorShiftEffectImplTests
|
||||
Assert.Equal((int)DispersionLaw.Prism, impl.Dispersion);
|
||||
Assert.Equal(480f, impl.ReferenceWavelength);
|
||||
Assert.Equal(16, impl.Steps);
|
||||
Assert.Equal(1, impl.Physical);
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする