docs.unity3d.com
    Show / Hide Table of Contents

    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

    Input

    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
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023