stereolabs/zed-unity

ZED point cloud size control in shader

robot-Yang opened this issue · 4 comments

Preliminary Checks

  • This issue is not a duplicate. Before opening a new issue, please search existing issues.
  • This issue is not a question, bug report, or anything other than a feature request directly related to this project.

Proposal

I found this line: _Size("Size", Range(0.1,2)) = 0.1 in ZED_PointCloud.shader, but it does not really work to control the size, I am quite naive to this shader thing. Does anyone know how to implement the point cloud size control? Thanks!

Use-Case

Control point cloud size in Unity.

Anything else?

No response

Hi,

You can change the size of the points when using the ZEDFusedPointCloudRenderer.cs script.
The material used is called "Mat_ZED_FusedPC_Disk', you can take a lot how is it done.

Best,
Benjamin Vallon

Thanks for the information, I tried to modify the ZEDPointCloudMnager.cs and ZED_PointCloud.shader but I am quite new to shader and couldn't make it work, could you please show a more concrete code? I think this will be also helpful to many people.

For others' information, I tried to use Psize in ZED_PointCloud.shader, it is straightforward and works with OpenGL API, but zed-unity plugin doesn't work perfectly with OpenGL API, so I have to go back to Direct3D11, where Psize is not supported.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days