Skip to content

[codex] Compile parametric brush shaders into metallib#303

Merged
muukii merged 1 commit into
v5from
codex/compile-parametric-metal
Jun 16, 2026
Merged

[codex] Compile parametric brush shaders into metallib#303
muukii merged 1 commit into
v5from
codex/compile-parametric-metal

Conversation

@muukii

@muukii muukii commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Move parametric brush Core Image kernels from copied .metal.txt source to build-compiled .metal sources.
  • Move the live brush-mask render shader into BrightroomParametric so it is compiled into the same default.metallib.
  • Share brush falloff through BrushStampFalloff.metalh, loaded by both the Core Image kernel and live Metal render shader.
  • Load kernels via CIColorKernel(functionName:fromMetalLibraryData:) and live render functions via MTLDevice.makeLibrary(URL:).

Why

The previous resource-copy/runtime-compile setup existed to avoid missing brushStampAlpha during Metal compilation. Now the shared falloff is a real Metal header included by both compiled sources, so the package can ship compiled Metal instead of text resources.

Validation

  • BrightroomUI simulator build via XcodeBuildMCP: succeeded.
  • BrightroomEngineTests targeted tests via XcodeBuildMCP: 4 passed.
    • BrushStampFalloffTests
    • BrushMaskRasterizerParityTests
  • Confirmed build output contains Brightroom_BrightroomParametric.bundle/default.metallib and build log runs CompileMetalFile + MetalLink for the new .metal sources.

@muukii muukii marked this pull request as ready for review June 16, 2026 18:06
@muukii muukii merged commit ec1cdf3 into v5 Jun 16, 2026
2 checks passed
@muukii muukii deleted the codex/compile-parametric-metal branch June 16, 2026 18:06
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