Unity PolySpatial ShaderGraph Support
You can use the Unity ShaderGraph 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 ShaderGraph nodes have no analog in materialX. Within the ShaderGraph 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 is 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 |
Filter | Dither | - Requires simulation of Screen Space Position. - Doesn't work at the moment due to bug with curvelookup node definitions. |
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 |
Input
Custom Interpolators
are limited to only this specific/names types:
Color
: Vector4UV0
: Vector2UV1
: Vector2UserAttribute
: Vector4Section 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 3x3Doesn't work (due to bug in constant matrix node definitions) Matrix 4x4Doesn'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
andDirection
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 Quantum. Implements the splitlr function as described in the MaterialX spec: https://materialx.org/assets/MaterialX.v1.38.Spec.pdf | |
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 |