Skip to content

fix: use FoveatedRenderingKeywords.hlsl instead of manual foveated rendering pragmas - #868

Merged
sindharta-tanuwijaya merged 7 commits into
masterfrom
visionos
Aug 25, 2026
Merged

fix: use FoveatedRenderingKeywords.hlsl instead of manual foveated rendering pragmas #868
sindharta-tanuwijaya merged 7 commits into
masterfrom
visionos

Conversation

@sindharta-tanuwijaya

Copy link
Copy Markdown
Contributor
  • fix: restrict Metal foveated rendering to visionOS target platforms

  • fix: restrict Metal foveated rendering to visionOS (Tessellation)

* fix: restrict Metal foveated rendering to visionOS target platforms

* fix: restrict Metal foveated rendering to visionOS (Tessellation)

Copilot AI 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.

Pull request overview

Restricts the SUPPORTS_FOVEATED_RENDERING_NON_UNIFORM_RASTER path so that Metal-only foveated rendering is no longer enabled broadly on Apple Metal targets, and is instead gated to visionOS (while keeping PS5 enabled). This aligns the shader feature with the PR’s stated intent of limiting Metal foveated rendering to visionOS.

Changes:

  • Updated #if guards so SHADER_API_METAL only enables the foveated rendering non-uniform raster path when UNITY_VISIONOS is also defined.
  • Applied the same platform restriction in both the standard Toon shader and the tessellation variant.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
com.unity.toonshader/Runtime/Shaders/UnityToon.shader Gates Metal foveated rendering support behind UNITY_VISIONOS (PS5 unchanged).
com.unity.toonshader/Runtime/Shaders/UnityToonTessellation.shader Mirrors the same Metal+visionOS restriction for the tessellation shader.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread com.unity.toonshader/Runtime/Shaders/UnityToon.shader Outdated
Comment thread com.unity.toonshader/Runtime/Shaders/UnityToonTessellation.shader Outdated
@sindharta sindharta changed the title Fix: restrict Metal foveated rendering to VisionOS (#867) fix: use FoveatedRenderingKeywords.hlsl instead of manual foveated rendering pragmas Aug 24, 2026
@sindharta-tanuwijaya
sindharta-tanuwijaya requested a lite review from Copilot August 25, 2026 02:45

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@sindharta-tanuwijaya
sindharta-tanuwijaya merged commit 48ccb87 into master Aug 25, 2026
32 checks passed
@sindharta-tanuwijaya
sindharta-tanuwijaya deleted the visionos branch August 25, 2026 02:55
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.

4 participants