コミットを比較
| 作成者 | SHA1 | 日付 | |
|---|---|---|---|
|
|
4c93f2ee33
|
||
|
|
ff008e6ce2
|
検索条件に一致するファイルはありません
@@ -1,5 +1,5 @@
|
||||
========================================
|
||||
氷晶成長 for YMM4 v1.1.1
|
||||
氷晶成長 for YMM4 v1.1.2
|
||||
========================================
|
||||
YukkuriMovieMaker4上で動作する、素材の縁を結晶の核とみなし、
|
||||
Gravner–Griffeathの雪結晶成長モデルで氷晶を成長させて霜として描画する
|
||||
|
||||
@@ -250,6 +250,25 @@ public sealed class CrystallineGrowthEffectProcessorTests
|
||||
Assert.True(first.SamePixelsAs(again));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(60, 64)]
|
||||
[InlineData(64, 36)]
|
||||
public void AnImageOfAnySizeIsDrawnTheSameOnTheNextFrame(int width, int height)
|
||||
{
|
||||
using var devices = new GraphicsDevices();
|
||||
using var context = devices.CreateContext();
|
||||
RequireInterop(context);
|
||||
using var source = SourceImage.Solid(context, width, height, Gray);
|
||||
using var processor = new CrystallineGrowthEffect().CreateVideoEffect(context);
|
||||
processor.SetInput(source.Bitmap);
|
||||
|
||||
var first = RenderFrame(context, processor, 0);
|
||||
var next = RenderFrame(context, processor, 1);
|
||||
|
||||
Assert.True(HasFrostOutside(first, source));
|
||||
Assert.True(first.SamePixelsAs(next));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ANewProcessorDrawsTheSameFrost()
|
||||
{
|
||||
|
||||
@@ -449,6 +449,30 @@ public sealed class CrystallineGrowthPipelineTests
|
||||
Assert.Null(pipeline.SourceHash);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(100, 64)]
|
||||
[InlineData(64, 60)]
|
||||
public void RecoloringOnlyTheLastPixelChangesTheSourceHashAtAnySize(int width, int height)
|
||||
{
|
||||
using var pipeline = CreatePipeline();
|
||||
var device = GraphicsDevice.GetDefault();
|
||||
using var sourceTexture = device.AllocateReadWriteTexture2D<Bgra32, Float4>(width, height);
|
||||
var gray = Square(width, height, 0, 0, width, height);
|
||||
var recolored = gray.ToArray();
|
||||
recolored[^1] = unchecked((int)0xFFFF0000);
|
||||
var parameters = Parameters(seed: 3);
|
||||
Upload(sourceTexture, gray);
|
||||
pipeline.Simulate(sourceTexture, width, height, 0, 0, width, height, in parameters, hashSource: true);
|
||||
var grayHash = Assert.NotNull(pipeline.SourceHash);
|
||||
|
||||
Upload(sourceTexture, recolored);
|
||||
pipeline.Simulate(sourceTexture, width, height, 0, 0, width, height, in parameters, hashSource: true);
|
||||
var recoloredHash = Assert.NotNull(pipeline.SourceHash);
|
||||
|
||||
Assert.NotEqual(grayHash.Sum, recoloredHash.Sum);
|
||||
Assert.NotEqual(grayHash.Mix, recoloredHash.Mix);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TheGrowthIsSimulatedAgainOnlyWhenTheShapeOrTheGrowthSettingsChange()
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>1.1.1</Version>
|
||||
<Version>1.1.2</Version>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
|
||||
@@ -282,7 +282,10 @@ internal sealed partial class CrystallineGrowthPipelineHost
|
||||
{
|
||||
context.For(1, new SourceHashResetShader(scratch));
|
||||
context.Barrier(scratch);
|
||||
context.For(sourceWidth, sourceHeight, new SourceHashShader(source, scratch, sourceWidth, sourceHeight));
|
||||
context.For(
|
||||
ThreadGroupAlignment.AlignX<SourceHashShader>(sourceWidth),
|
||||
ThreadGroupAlignment.AlignY<SourceHashShader>(sourceHeight),
|
||||
new SourceHashShader(source, scratch, sourceWidth, sourceHeight));
|
||||
context.Barrier(scratch);
|
||||
}
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする