Skip to content

HDRP support #105

Description

@unitycoder

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
  • image
  • 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
}
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions