Search Issue Tracker

By Design

Under Consideration for 2021.3.X, 2022.3.X, 2023.1.X, 2023.2.X, 2023.3.X

Votes

0

Found in

2021.3.29f1

2022.3.7f1

2023.1.9f1

2023.2.0b5

2023.3.0a3

Issue ID

UUM-46766

Regression

No

Shadergraph shader does not support rendering point topology on Metal

--

-

Reproduction steps:
1. Open the "IN-34755.zip" project
2. Open the "Assets/CesiumForUnitySamples/Scenes/06_CesiumPointClouds" Scene
3. Observe the Scene view

Expected results: Points are of normal size
Actual results: Points are of unreasonable size

The reason for this behavior is that the ShaderGraph rendering the point cloud does not emit a `PSIZE` value (see comment below)

Reproducible with: 2021.3.29f1, 2022.3.7f1, 2023.1.9f1, 2023.2.0b5

Reproducible on: macOS 13.4 (M1)
Not reproducible on: macOS 13.4 (Intel)

Note: Reproducible in Standalone Player

  1. Resolution Note:

    This is currently a known limitation of the Shader Graph, which does not offer a way to set the point size. On some graphics APIs, including Metal, rendering points without setting the point size is undefined behavior. See "Semantics used by Shaders" at https://docs.unity3d.com/Manual/SL-PlatformDifferences.html for additional information.

    While support may be added in the future, here are some ideas for workarounds in the meantime:

    - You could use the Shader Graph to generate HLSL code via the "View generated shader" option. You could then patch this code to set the PSIZE attribute, and use this shader for your material. Note that this step needs to be repeated whenever Shader Graph or Unity or updated, or when the Shader Graph is modified.
    - You could try rendering instanced triangles or quads instead of points

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.