Unity PolySpatial Shader Graph Support
You can use the Unity Shader Graph to create custom materials for visionOS. These will previewed in their compiled form within Unity, but converted to MaterialX for display in simulator and on device. While MaterialX is very expressive, some Shader Graph nodes have no analog in materialX. Within the Shader Graph editor, unsupported nodes will be indicated by the presence of a #
symbol.
For technical, security, and privacy reasons, visionOS does not allow Metal-based shaders or other low level shading languages to run when using AR passthrough.
Shader Graph Limitations in visionOS
The following tables show the current support status for Shader Graph nodes in PolySpatial for visionOS including a list of supported nodes and their various caveats.
If a node doesn't appear here it means that it's not currently supported. Note that this list will be updated as we continue to add support for more nodes.
Artistic
Section |
Node |
Notes |
Adjustment |
Contrast |
Colors may not be consistent. |
|
Hue |
Colors may not be consistent. |
|
Saturation |
Colors may not be consistent. |
Blend |
Blend |
Supports Difference, Subtract, Burn, Dodge, Linear Dodge, Overlay, Screen, Overwrite, Negation, Multiply |
Normal |
Normal Blend |
✓ Supported |
|
Normal From Height |
✓ Supported |
|
Normal Reconstruct Z |
✓ Supported |
|
Normal Strength |
✓ Supported |
|
Normal Unpack |
✓ Supported |
Utility |
Colorspace Conversion |
Not consistent - linear conversions not implemented. |
Channel
Section |
Node |
Notes |
Channel |
Combine |
✓ Supported |
|
Split |
✓ Supported |
|
Swizzle |
✓ Supported |
Custom Interpolators
are limited to these specific/names types:
Color
: Vector4
UV0
: Vector2
UV1
: Vector2
UserAttribute
: Vector4
Section |
Node |
Notes |
Basic |
Boolean |
✓ Supported |
|
Color |
✓ Supported |
|
Constant |
✓ Supported |
|
Integer |
✓ Supported |
|
Slider |
✓ Supported |
|
Time |
✓ Supported |
|
Float |
✓ Supported |
|
Vector2 |
✓ Supported |
|
Vector3 |
✓ Supported |
|
Vector4 |
✓ Supported |
Geometry |
Bitangent Vector |
Tangent and View space options are not standard. |
|
Normal Vector |
Tangent and View space options are not standard. |
|
Position |
Tangent and View space options are not standard. |
|
Screen Position |
✓ Supported |
|
Tangent Vector |
Tangent and View space options are not standard. |
|
UV |
✓ Supported |
|
Vertex Color |
✓ Supported |
|
Vertex ID |
✓ Supported |
Gradient |
Gradient |
✓ Supported |
|
Sample Gradient |
✓ Supported |
Lighting |
Main Light Direction |
✓ Supported |
Matrix |
Matrix 3x3 |
Doesn't work (due to bug in constant matrix node definitions) |
|
Matrix 4x4 |
Doesn't work (due to bug in constant matrix node definitions) |
|
Matrix Construction |
✓ Supported |
|
Transformation Matrix |
Tangent and View space options are not standard. |
Scene |
Camera |
Position and Direction outputs supported (non-standard). |
|
Object |
✓ Supported |
|
Scene Depth |
Platform doesn't allow have access to the depth buffer, this is just the camera distance in either clip or view space. |
|
Screen |
✓ Supported |
Texture |
Sample Texture 2D |
✓ Supported |
|
Sample Texture 2D LOD |
✓ Supported |
|
Sampler State |
MirrorOnce wrap mode not supported. |
|
Texture 2D Asset |
✓ Supported |
|
Texture Size |
✓ Supported |
Math
Section |
Node |
Notes |
Advanced |
Absolute |
✓ Supported |
|
Exponential |
✓ Supported |
|
Length |
✓ Supported |
|
Log |
✓ Supported |
|
Modulo |
✓ Supported |
|
Negate |
✓ Supported |
|
Normalize |
✓ Supported |
Basic |
Add |
✓ Supported |
|
Divide |
✓ Supported |
|
Multiply |
✓ Supported |
|
Power |
✓ Supported |
|
Square Root |
✓ Supported |
|
Subtract |
✓ Supported |
Interpolation |
Inverse Lerp |
✓ Supported |
|
Lerp |
✓ Supported |
|
Smoothstep |
✓ Supported |
Matrix |
Matrix Determinant |
Will flag as unsupported if using Matrix2. |
|
Matrix Transpose |
Will flag as unsupported if using Matrix2. |
Range |
Clamp |
✓ Supported |
|
Fraction |
✓ Supported |
|
Maximum |
✓ Supported |
|
Minimum |
✓ Supported |
|
One Minus |
✓ Supported |
|
Random Range |
✓ Supported |
|
Remap |
✓ Supported |
|
Saturate |
✓ Supported |
Round |
Ceiling |
✓ Supported |
|
Floor |
✓ Supported |
|
Round |
✓ Supported |
|
Sign |
✓ Supported |
|
Step |
✓ Supported |
Trigonometry |
Arccosine |
✓ Supported |
|
Arcsine |
✓ Supported |
|
Arctangent |
✓ Supported |
|
Arctangent2 |
✓ Supported |
|
Cosine |
✓ Supported |
|
Sine |
✓ Supported |
|
Tangent |
✓ Supported |
Vector |
Cross Product |
✓ Supported |
|
Distance |
✓ Supported |
|
Dot Product |
✓ Supported |
|
Fresnel Effect |
✓ Supported |
|
Reflection |
✓ Supported |
|
Rotate About Axis |
✓ Supported |
|
Transform |
Some spaces are simulated and not covered in tests. |
Wave |
Triangle Wave |
✓ Supported |
Procedural
Section |
Node |
Notes |
Noise |
Gradient Noise |
- Can't be certain that target platform noise functions will behave the same. - Frequency is currently off (scale is mapped to amplitude rather than frequency). |
|
Voronoi |
- Can't be certain that target platform noise functions will behave the same. |
Shapes |
Ellipse |
✓ Supported |
Utility
Section |
Node |
Notes |
Utility |
Preview |
✓ Supported |
|
Split LR |
Non-standard shader graph node specific to PolySpatial. Implements the splitlr function as described in the MaterialX Spec. |
Logic |
Branch |
✓ Supported |
|
Comparison |
✓ Supported |
|
Or |
✓ Supported |
UV
Section |
Node |
Notes |
UV |
Flipbook |
✓ Supported |
|
Rotate |
Only Degrees are supported. |
|
Tiling and Offset |
✓ Supported |
|
Triplanar |
✓ Supported |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.