Fix: restrict Metal foveated rendering to VisionOS (#867) - #868
Open
sindharta-tanuwijaya wants to merge 5 commits into
Open
Fix: restrict Metal foveated rendering to VisionOS (#867)#868sindharta-tanuwijaya wants to merge 5 commits into
sindharta-tanuwijaya wants to merge 5 commits into
Conversation
* fix: restrict Metal foveated rendering to visionOS target platforms * fix: restrict Metal foveated rendering to visionOS (Tessellation)
There was a problem hiding this comment.
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
#ifguards soSHADER_API_METALonly enables the foveated rendering non-uniform raster path whenUNITY_VISIONOSis 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 on lines
1103
to
1107
| #if (!defined(UNITY_COMPILER_DXC) && (defined(UNITY_PLATFORM_OSX) || defined(UNITY_PLATFORM_IOS))) || defined(SHADER_API_PS5) | ||
|
|
||
| #if defined(SHADER_API_PS5) || defined(SHADER_API_METAL) | ||
| #if defined(SHADER_API_PS5) || (defined(SHADER_API_METAL) && defined(UNITY_VISIONOS)) | ||
|
|
||
| #define SUPPORTS_FOVEATED_RENDERING_NON_UNIFORM_RASTER 1 |
Comment on lines
1242
to
1246
| #if (!defined(UNITY_COMPILER_DXC) && (defined(UNITY_PLATFORM_OSX) || defined(UNITY_PLATFORM_IOS))) || defined(SHADER_API_PS5) | ||
|
|
||
| #if defined(SHADER_API_PS5) || defined(SHADER_API_METAL) | ||
| #if defined(SHADER_API_PS5) || (defined(SHADER_API_METAL) && defined(UNITY_VISIONOS)) | ||
|
|
||
| #define SUPPORTS_FOVEATED_RENDERING_NON_UNIFORM_RASTER 1 |
This reverts commit 1ce3fbf.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: restrict Metal foveated rendering to visionOS target platforms
fix: restrict Metal foveated rendering to visionOS (Tessellation)