Skip to content

Commit

Permalink
feat: Make RTHS compatible with HDRP and Universal RP. (#42)
Browse files Browse the repository at this point in the history
* A HDRP sample scene started to work.

* Renamed classname suffix HDRP to SRP and added a Universl RP sample.

* Deleted ShadowRaytracerSRP and modfied ShadowRaytracer.cs

* added m_srpCallbackInitialized in ShadowRaytracer.cs.

* Added UI to select target Render pipeline and add special care for HDRP.

* Added a description label field for HDRP light list.

* Deleted unnccesary logs.

Co-authored-by: higeometry <[email protected]>
  • Loading branch information
H3idi-X and H3idi-X authored May 26, 2020
1 parent 1a2bee4 commit 97df23e
Show file tree
Hide file tree
Showing 165 changed files with 20,565 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ RaytracedHardShadow~/*.csproj
RaytracedHardShadow~/*.sln
RaytracedHardShadow~/.idea/**

RaytracedHardShadowHDRP~/*.csproj
RaytracedHardShadowHDRP~/*.sln
RaytracedHardShadowHDRP~/.idea/**

RaytracedHardShadowUniversalRP~/*.csproj
RaytracedHardShadowUniversalRP~/*.sln
RaytracedHardShadowUniversalRP~/.idea/**
# Logs
RaytracedHardShadow~/Logs/*

RaytracedHardShadowHDRP~/Logs/*
RaytracedHardShadowUniversalRP~/Logs/*
13 changes: 13 additions & 0 deletions Editor/Scripts/ShadowRaytracerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using UnityEngine;
using UnityEditor;
using Unity.RaytracedHardShadow;
using UnityEngine.Rendering;

namespace Unity.RaytracedHardShadow.Editor
{
Expand Down Expand Up @@ -126,6 +127,11 @@ public override void OnInspectorGUI()
var t = target as ShadowRaytracer;
var so = serializedObject;

// render pipe line.
EditorGUILayout.Space();
EditorGUILayout.LabelField("Render pipeline", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(so.FindProperty("m_renderPipeLine"));

// output
EditorGUILayout.Space();
EditorGUILayout.LabelField("Output", EditorStyles.boldLabel);
Expand Down Expand Up @@ -194,6 +200,13 @@ public override void OnInspectorGUI()
break;
}
}
if (t.renderPipeline == ShadowRaytracer.RenderPipeline.HDRP)
{
EditorGUILayout.PropertyField(so.FindProperty("m_HDRPDirectionalLightList"), true );
EditorGUI.indentLevel++;
EditorGUILayout.LabelField("If you want to use multiple light sources for shadows in HDRP, put the lights into above and disable their shadow map.");
EditorGUI.indentLevel--;
}
EditorGUILayout.Space();

// geometry
Expand Down
8 changes: 8 additions & 0 deletions RaytracedHardShadowHDRP~/Assets/HDRPDefaultResources.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 97df23e

Please sign in to comment.