Add external flame density oracle
This commit is contained in:
parent
c9eb44cc0c
commit
9b469bef4b
7 changed files with 281 additions and 16 deletions
|
|
@ -13,6 +13,7 @@ param(
|
|||
[int]$VisualParityReferenceSamples = 1000000,
|
||||
[string]$HistogramSize = "64x64",
|
||||
[string]$HistogramBounds = "-8,-8,8,8",
|
||||
[string]$ReferenceDensityPpm = "",
|
||||
[string[]]$VisualParityView = @(),
|
||||
[string]$VisualParityImageDirectory = "",
|
||||
[string]$VisualParityImagePrefix = "visual-parity",
|
||||
|
|
@ -28,13 +29,15 @@ if (-not [string]::IsNullOrWhiteSpace($ProgramFlame)) {
|
|||
}
|
||||
|
||||
$parityArgs = @()
|
||||
if ($VisualParity) {
|
||||
if ($VisualParity -or -not [string]::IsNullOrWhiteSpace($ReferenceDensityPpm)) {
|
||||
$parityArgs = @(
|
||||
"--visual-parity",
|
||||
"--visual-parity-reference-samples", "$VisualParityReferenceSamples",
|
||||
"--histogram-size", $HistogramSize,
|
||||
"--histogram-bounds", $HistogramBounds
|
||||
)
|
||||
if ($VisualParity) {
|
||||
$parityArgs = @("--visual-parity") + $parityArgs
|
||||
}
|
||||
foreach ($view in $VisualParityView) {
|
||||
$parityArgs += @("--visual-parity-view", $view)
|
||||
}
|
||||
|
|
@ -43,6 +46,10 @@ if ($VisualParity) {
|
|||
$parityArgs += @("--visual-parity-image-dir", $parityImageDir, "--visual-parity-image-prefix", $VisualParityImagePrefix)
|
||||
}
|
||||
}
|
||||
if (-not [string]::IsNullOrWhiteSpace($ReferenceDensityPpm)) {
|
||||
$referenceDensityPpmPath = if ([System.IO.Path]::IsPathRooted($ReferenceDensityPpm)) { $ReferenceDensityPpm } else { Join-Path $repoRoot $ReferenceDensityPpm }
|
||||
$parityArgs += @("--reference-density-ppm", $referenceDensityPpmPath)
|
||||
}
|
||||
|
||||
dotnet run --project (Join-Path $repoRoot "tools\Aquarium.Fractal.Receipt\Aquarium.Fractal.Receipt.csproj") -c Release -- `
|
||||
--splats $Splats `
|
||||
|
|
|
|||
21
scripts/new-jwildfire-baby-fixture.ps1
Normal file
21
scripts/new-jwildfire-baby-fixture.ps1
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
param(
|
||||
[string]$Source = "artifacts\reference-tools\j-wildfire-9.00\lib\FARenderJWF\selftest.flame",
|
||||
[string]$Output = "artifacts\fractal-flame-jwildfire-reference\julian-disc-baby.flame"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$sourcePath = if ([System.IO.Path]::IsPathRooted($Source)) { $Source } else { Join-Path $repoRoot $Source }
|
||||
$outputPath = if ([System.IO.Path]::IsPathRooted($Output)) { $Output } else { Join-Path $repoRoot $Output }
|
||||
New-Item -ItemType Directory -Force -Path (Split-Path -Parent $outputPath) | Out-Null
|
||||
|
||||
$text = [System.IO.File]::ReadAllText((Resolve-Path $sourcePath))
|
||||
$text = $text.Replace('JulianDisc - 535389044', 'julian-disc-baby')
|
||||
$text = $text.Replace('jwf_julian_power="126"', 'jwf_julian_power="8"')
|
||||
$text = $text.Replace('jwf_gaussian_blur="0.039366260122290476"', 'jwf_gaussian_blur="0.0"')
|
||||
$text = $text.Replace('wfield_var_amount="0.21416904132907888"', 'wfield_var_amount="0.0"')
|
||||
$text = $text.Replace('wfield_color_amount="0.26564915787570376"', 'wfield_color_amount="0.0"')
|
||||
$text = $text.Replace('wfield_jitter_amount="0.13887944166913668"', 'wfield_jitter_amount="0.0"')
|
||||
|
||||
[System.IO.File]::WriteAllText($outputPath, $text, [System.Text.UTF8Encoding]::new($false))
|
||||
Write-Host "JWildfire baby fixture: $outputPath"
|
||||
Loading…
Reference in a new issue