Open
Description
not included in the asset store package yet, but can try this: (2019.4.19f1 + HDRP 7.1.8, for V1/V2 viewer (not v3 tiles viewer))
- project window right click, Create/Rendering/C# Custom pass
- main camera: Add Component, Custom Pass Volume
- Select some injection point (try which one works the best)
- Add your Custom pass with + button
- Modify PointCloudViewerDX11.cs
- Add line:
public static PointCloudViewerDX11 instance;
- Add line inside Awake():
instance = this;
- Use custom pass script below
- Test!
Custom pass script:
using UnityEngine;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.Rendering;
class NewCustomPass : CustomPass
{
protected override void Setup(ScriptableRenderContext renderContext, CommandBuffer cmd)
{
// Setup code here
}
protected override void Execute(ScriptableRenderContext renderContext, CommandBuffer cmd, HDCamera camera, CullingResults cullingResult)
{
if (unitycodercom_PointCloudBinaryViewer.PointCloudViewerDX11.instance == null) return;
cmd.DrawProcedural(Matrix4x4.identity, unitycodercom_PointCloudBinaryViewer.PointCloudViewerDX11.instance.cloudMaterial, 0, MeshTopology.Points, unitycodercom_PointCloudBinaryViewer.PointCloudViewerDX11.instance.points.Length);
renderContext.ExecuteCommandBuffer(cmd);
}
protected override void Cleanup()
{
// Cleanup code
}
}
Metadata
Metadata
Assignees
Labels
No labels