Skip to content

feat(shader): add Shader support - #1288

Open
Kyle-Ye wants to merge 5 commits into
mainfrom
feature/shader
Open

Kyle-Ye wants to merge 5 commits into
mainfrom
feature/shader

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add Shader, ShaderLibrary, and ShaderFunction with argument binding and asynchronous compilation.
  • Add color, distortion, and layer-effect modifiers and the GraphicsContext.Shading.shader factory.
  • Integrate shader paints with decoding and argument animation.
  • Use the shared shader fill and filter flags from OpenRenderBox Shims.

Close #1223.

Dependency

Decode Shader.ResolvedShader in CodableResolvedPaint, add
GraphicsContext.Shading.shader(_:bounds:), and animate shader arguments
through _ShapeStyle_Pack.Fill.AnimatableData.
Update DarwinPrivateFrameworks and OpenRenderBox to the device API changes.
Keep Shader.compile(as:) available on targets without Dispatch.
Update the RenderBox dependencies and use their shared fill and filter
options in shader resolution and tests.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T17:56:51.135322Z b6dc6b4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added area: graphics Color, shape, gradient, image, symbols, and graphics primitives. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. type: feature New API, behavior, platform support, or user-facing capability. labels Nov 29, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6dc6b45b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +869 to +870
case (1, let .float4(x, y, z, w)), (5, let .float4(x, y, z, w)):
shader.setArgument((x, y, z, w), at: index, type: argument.type, flags: argument.flags)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match argument type 4 when updating float4 animation values

When a shader's .float4(...) argument is animated, it is bound with RenderBox type 4 and extracted as a .float4 animation element, but this branch matches types 1 and 5 instead. Consequently, updating(rbShader:) falls through without writing the interpolated value, leaving float4 uniforms unchanged during animations of shader fills and effects. Match type 4 rather than 1 here so the animated components reach the copied shader.

Useful? React with 👍 / 👎.

@Kyle-Ye Kyle-Ye added this to the 0.27.0 milestone Nov 29, 2026
@tuist

tuist Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
OpenSwiftUI ❌ 7 2d057c644

Failed Tests ❌

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 57.5s 2d057c644

Reported by Tuist, faster builds and reliable tests for Xcode, Gradle, Bazel, and more.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Color, shape, gradient, image, symbols, and graphics primitives. area: rendering DisplayList, render backends, renderer hosts, drawing, and effects. type: feature New API, behavior, platform support, or user-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Shader support

1 participant