Skip to content

PHO-17: Add VoxelFrameBuilder with pattern, color, and geometry pipeline#37

Merged
wow-miley merged 1 commit into
mainfrom
miley/pho-17-add-voxelframebuilder-pattern-color-and-geometry-pipeline
May 25, 2026
Merged

PHO-17: Add VoxelFrameBuilder with pattern, color, and geometry pipeline#37
wow-miley merged 1 commit into
mainfrom
miley/pho-17-add-voxelframebuilder-pattern-color-and-geometry-pipeline

Conversation

@wow-miley
Copy link
Copy Markdown
Contributor

Summary

  • Adds VoxelFrameBuilder in :phosphor-lumos: a stateful translator from SceneSnapshot + VoxelSphere to VoxelFrame. Owns continuous pulse/pattern/rotation phase accumulators, evaluates all seven AtmospherePattern formulas with linear crossfade between source and target patterns, applies bipolar boundary shrink via smoothstep, and computes per-voxel color through HSL with an OKLab crossfade whenever from.bipolarStrength != to.bipolarStrength so distant-hue transitions stop passing through forbidden midpoints.
  • Adds LumosRenderConfig with globalYSquashOverride, enableGlyphCarving, and omitBelowScale knobs; the per-voxel sRGB light-budget contract is documented on the config rather than enforced by the builder.
  • Adds 16 unit tests covering steady-state cell count, dt=0 bit-identity, monotonic phase advance, SOLID + bipolar boundary collapse, unthinned voxels far from the boundary, IDLE↔UNCERTAIN OKLab color crossfade, IDLE→LISTENING pattern crossfade, phase continuity across a frequency doubling, accumulator wrap bounds, resolution rebuild, omitBelowScale filtering, globalYSquashOverride Y-only effect, ambient glow shape, IllegalStateException when atmosphere is absent, and tick/timestamp passthrough.

Test plan

  • ./gradlew :phosphor-lumos:jvmTest
  • ./gradlew ktlintCheck
  • ./gradlew :phosphor-lumos:compileKotlinIosSimulatorArm64 (iOS compile gate)

🤖 Generated with Claude Code

Introduces VoxelFrameBuilder and LumosRenderConfig in :phosphor-lumos so a
SceneSnapshot can be translated into a VoxelFrame each tick: the builder
owns continuous pulse/pattern/rotation phase accumulators, evaluates the
seven AtmospherePattern formulas (with linear pattern crossfade across
transitions), applies bipolar boundary shrink with a smoothstep falloff,
and computes per-voxel color via HSL — falling back to OKLab crossfade
when a transition changes bipolarStrength so amber↔purple no longer
passes through pink.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@wow-miley wow-miley merged commit db4cd4d into main May 25, 2026
3 checks passed
@wow-miley wow-miley deleted the miley/pho-17-add-voxelframebuilder-pattern-color-and-geometry-pipeline branch May 25, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant